ASDATE Returns "Can't parse date exception"

2 followers
0
Avatar

I am trying to convert a column with data in STRING format (stored as yyyy-mm-dd hh mm ss) to DATE format using the ASDATE function and getting a "can't parse date" exception. 

I am fairly new to the tool any suggestions are welcome.

Thanks!

Pallavi Gautam

4 comments

  • Avatar
    Joel Stewart

    Can you share an example of the raw STRING data that you are trying to convert? 

    The formatting for ASDATE requires precision. If there is a ":" character instead of a " " character, that needs to be reflected into the parse pattern used. 

    0
  • Avatar
    Pallavi Gautam

     

    2016-08-16 12:52:20 this is an example of the raw string I am trying to convert.

     

    0
  • Avatar
    Joel Stewart

    Based on the example shared, the ASDATE function should use this format: 

    yyyy-MM-dd HH:mm:ss
    0
Please sign in to leave a comment.