In date getting Unparsable error

sgnarkhede2016
sgnarkhede2016 New Altair Community Member
edited November 2024 in Community Q&A
Hello,
I have one column that contain date in "19-JAN-21 11.53.15.409000000 AM" this fromat with nominal datatype when I trying to convert nominal to date with mm/dd/yyyy format getting unparsable format

Tagged:

Best Answer

  • jacobcybulski
    jacobcybulski New Altair Community Member
    Answer ✓
    Hi @sgnarkhede2016, @BalazsBarany is correct you need to specify the correct format for the conversion of a nominal to date format. You have used "mm/dd/yyyy" however the date-time format for your field is more complex, i.e. "dd-MM-yy hh.mm.ss.S a". Once you parse the date-time string, you will have a proper internal representation useful for any date-time related manipulation; and if you want to split it into components or convert it to a string of another format you can using other operators.

Answers

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Hi @sgnarkhede2016,

    you need to specify the correct format for the conversion. The operator help contains all the necessary characters for specifying the custom format.

    Converting with the wrong format (the one you selected) leads to the conversion error.

    Regards,
    Balázs
  • jacobcybulski
    jacobcybulski New Altair Community Member
    Answer ✓
    Hi @sgnarkhede2016, @BalazsBarany is correct you need to specify the correct format for the conversion of a nominal to date format. You have used "mm/dd/yyyy" however the date-time format for your field is more complex, i.e. "dd-MM-yy hh.mm.ss.S a". Once you parse the date-time string, you will have a proper internal representation useful for any date-time related manipulation; and if you want to split it into components or convert it to a string of another format you can using other operators.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.