Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
josemaria_cabre
Contributor III
Contributor III

problem with Timestamp

Hi,

I have a problem converting a field (Create Date) to timestamp, as it is swapping year and Day.

Using an example from this table, 01-03-19 16:14 should be converted to 01/03/2019 16:14:00, where 01 is day and 19 is year, but it is converting to 2001/03/19 16:14:00

screenshot.png

I tried changing parameters from main section in script, but it didn't work either

main.png

Can anyone help with this issue pls?

Thanks in advance,

Jose

Labels (2)
1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

 

Load *, Timestamp(Timestamp#([Create Date],'MM-DD-YY hh:mm'),'YYYY/MM/DD hh:mm:ss') as NewField

From XYZ;

 

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

 

Load *, Timestamp(Timestamp#([Create Date],'MM-DD-YY hh:mm'),'YYYY/MM/DD hh:mm:ss') as NewField

From XYZ;

 

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
josemaria_cabre
Contributor III
Contributor III
Author

Worked perfect.

Thanks for your help Kaushik!
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Good to hear that.

Cheers.

 

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!