Timestamp Parsing & Sorting

Solved!
ranjith
Level 2
Timestamp Parsing & Sorting

Hi, 

I have a Dataset that has a date column (timestamp)

[Eg1/13/2020 2:14:58.444000 PM]

1) IS there a way to parse this? (The parse option is not detecting the timestamp format)

2) I want to basically subtract the current date from this timestamp column (sorted in descending) to obtain the number of days in another column

Would someone be able to suggest if this is feasible with dataiku? 

Any inputs on the same would be highly appreciated! 

Thanks in advance

0 Kudos
1 Solution
fchataigner2
Dataiker

Hi

the format for this datetime should be MM/dd/yyyy KK:mm:ss.SSSSSS aa

Regards,

    Frederic

View solution in original post

5 Replies
Ludovic_Pรฉnet

Dear Sir,

 

regarding your first question, you can enter a custom format, as documented there for reference: https://doc.dataiku.com/dss/latest/preparation/dates.html#custom-formats

 

Regarding your second question, you should use in your prepare recipe a "Compute difference between dates" stephttps://doc.dataiku.com/dss/latest/preparation/processors/date-difference.html . It allows you to compute the difference between this date and "now".

 

 

fchataigner2
Dataiker

Hi

the format for this datetime should be MM/dd/yyyy KK:mm:ss.SSSSSS aa

Regards,

    Frederic

ranjith
Level 2
Author

I'm assuming you mean HH: and not KK: 

Right?

0 Kudos
fchataigner2
Dataiker

Hi,

HH means hour in 24h format, KK is hour in 12h format (and the trailing a is the AM/PM indicator)

Regards,

    Frederic

0 Kudos
ranjith
Level 2
Author

Thanks, that worked!