Converting string to date

Hi community,

I have a field named “DateTime” which stores the date but it’s datatype is string.

image

Now I want to convert it into datetime datatype. I tried changing datatype in dataset but date option is not showing up.

I also tried parseDate(DateTime, ‘dd/MM/yyyy’) but it is showing null values in every row.

image

Any kind of support or hint will be of great help for me. Thanking you in advance.

Regards,
Raghu

Hello @Raghu !

Can you try changing the data type from the three dots on the Fields panel on the left hand side of the Dataset page? I have some screenshots below. For the calculation you could try parseDate( DateTime, ‘yyyy-MM-dd’). That way the date formatting is the same as the string in your DateTime field.

Screenshot 2023-07-07 114208
Screenshot 2023-07-07 114335
Screenshot 2023-07-07 115105

Let me know if either of those solutions work!

Thank you @duncan,
It worked for me. I guess I was not using right date format in parseDate() function.

1 Like

Hello @Raghu ,

I’m glad that helped!

1 Like

Hello,

I am running into the same issue, but the edit date format option is not working for me.

The date format in my imported column is mm/dd/yyyy and it is currently formatted as string. I validated the column using the format - MM/dd/yyyy - and got the message that the format is valid.

when I try to update after validating, I get this error message.
image