4 Replies Latest reply on Apr 9, 2018 2:49 PM by Deepak Rai

    How to convert string to date field, it shows no errors but results bring back null

    Malini Ram

      Hello,

       

      I have a string called Month End that appears as:

      2018-03

      2018-02

      2018-01

       

      When I try clicking on Change Data Type to Date it does it but the results come back as null.

       

      I have tried many dateparse calculation variations, they show as valid and still results are null:

      DateParse("yyyyMM", [Month End])

       

      I am not sure what I am doing wrong, but I need this Month End to be a date type field for another calculation.

       

      I am able to split Month End into Year and Month but then I fall into the problem of not being able to concatenate it (I couldn't figure that out either)..

      INT( SPLIT( [Date], "-", 1 ) )

      INT( SPLIT( [Date], "-", 2 ) )

       

      Thanks in Advance!