Join us, on May 27th, for an introduction to the new Dataiku Academy Learn more

Timestamp Parsing & Sorting

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
5 Replies
Dataiker
Dataiker

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".

 

 

Dataiker
Dataiker

Hi

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

Regards,

    Frederic

Level 2
Author

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

Right?

0 Kudos
Dataiker
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
Level 2
Author

Thanks, that worked!