0

Field txt to date(dd/mm/yyyy)

There are any script to convert a field txt to a date format (dd/mm/yyyy)

5 replies

null
    • Fred
    • 3 mths ago
    • Reported - view

    what does the field text data look like? you will need to break up the data into month, day, year and then you can use the date() command to make it a date field.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 3 mths ago
      • Reported - view

      The Release Date is a text field and need the Format date dd/mm/yyy

      • Rafael Sanchis
      • Rafael_Sanchis
      • 3 mths ago
      • Reported - view

       

      let firstIndex := index(Release_Date, "/");
      let secondIndex := if substr(Release_Date, firstIndex + 2, 1) = "/" then
              firstIndex + 2
          else
              firstIndex + 3
          end;
      date(number(substr(Release_Date, secondIndex + 1, 4)), number(substr(Release_Date, 0, firstIndex)), number(substr(Release_Date, firstIndex + 1, secondIndex - firstIndex - 1)))
      

      I use this formula but the result Wrong

    • Ninox developer
    • Fabio
    • 3 mths ago
    • Reported - view

    Hi  

    Try this:

    let xArray := split(Release_Date, "/");
    let xYear := number(item(xArray, 2));
    let xMonth := number(item(xArray, 1));
    let xDay := number(item(xArray, 0));
    date(xYear, xMonth, xDay)

       Fabio

      • Rafael Sanchis
      • Rafael_Sanchis
      • 3 mths ago
      • Reported - view

       Excelent Fabio thanks a lot.👍

Content aside

  • Status Answered
  • 3 mths agoLast active
  • 5Replies
  • 41Views
  • 3 Following