cancel
Showing results for 
Search instead for 
Did you mean: 

Convert string to Timestamp

ashis1upreti
New Contributor II
  • Hello everyone, 

can someone please help convert string  “20240311113047” into TIMESTAMP format? Thank you!

1 ACCEPTED SOLUTION

Aleksandar_A
Contributor III

Hello @ashis1upreti,

You can try by using the Date.parse() function in a Mapper Snap.

In your case, as a second argument you need to provide the format in which the date is in.

Date.parse("20240311113047","yyyyMMddhhmmss")

Also, you can take a look at the Date.toLocaleDateTimeString() function if you want to format the date.

Please let me know if this helps you.

Regards,

Aleksandar.

View solution in original post

2 REPLIES 2

Aleksandar_A
Contributor III

Hello @ashis1upreti,

You can try by using the Date.parse() function in a Mapper Snap.

In your case, as a second argument you need to provide the format in which the date is in.

Date.parse("20240311113047","yyyyMMddhhmmss")

Also, you can take a look at the Date.toLocaleDateTimeString() function if you want to format the date.

Please let me know if this helps you.

Regards,

Aleksandar.

Thanks angel!