Ready for Dataiku 9? Try out the Crash Course on new features! GET STARTED

Internal Date Format Used in DSS Internal json files

Solved!
raviagrawal
Level 3
Level 3
Internal Date Format Used in DSS Internal json files

Hi,

 

I am creating a R script to read the dataiku project metadata from project path itself i.e. /DATA_DIR/config/projects/project_nm/params.json file. I am not able to understand the date forma used in the file i.e. 1581031993308. Could you please suggest what is this date format and if you have handy format function in R for this it would be very helpful ?

1 Solution
Clément_Stenac
Dataiker
Dataiker

Hi,

This is a UNIX timestamp, i.e. the number of milliseconds since 1970-01-01T00:00:00.000Z

There are many ways to parse this in R:

  • In base package: as.POSIXct(1581031993308/1000, origin="1970-01-01", timezone="GMT")
  • With anytime: anytime(1581031993308/1000)
  • With lubridate: as_datetime(1581031993308/1000)

View solution in original post

2 Replies
Clément_Stenac
Dataiker
Dataiker

Hi,

This is a UNIX timestamp, i.e. the number of milliseconds since 1970-01-01T00:00:00.000Z

There are many ways to parse this in R:

  • In base package: as.POSIXct(1581031993308/1000, origin="1970-01-01", timezone="GMT")
  • With anytime: anytime(1581031993308/1000)
  • With lubridate: as_datetime(1581031993308/1000)

View solution in original post

raviagrawal
Level 3
Level 3
Author

Thanks Clement !! That solves my problem.

0 Kudos
A banner prompting to get Dataiku DSS