15 Replies Latest reply: Aug 3, 2017 2:50 AM by An Pham RSS

    Issues with date format

    Max Ålander

      I have a table 'steps' with the following field headers




      I want to extract the date in the third header and add it to another table. When extracting the date I get vDateRow == 2017-05-03, but it doesn't stay that way when loaded into the table. I've tried several different ways but I can't seem to get it right. In the table below you can see several of the methods I tried.


      LET vDateRow = subfield(FieldName(3, 'steps'),'_',4);




      Date($(vDateRow)) AS week_date,

          Date#($(vDateRow)) AS week_date_1,

          Date#($(vDateRow), 'YYYY-MM-DD') AS week_date_2,

           $(vDateRow) AS week_date_3,

           [event] as [event_community],

          [count] AS [count_community]

      RESIDENT RestConnectorMasterTable

      WHERE NOT IsNull([__FK_steps]);


      And this is the date format I get in the table. None of them are correct.

      Screen Shot 2017-08-03 at 08.28.16.png


      How do I get the correct date format?