Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

how to truncate timestamp in now() in formula langugae

rsingamsetty
Level 3
how to truncate timestamp in now() in formula langugae

im using now() as a new column(refreshed_date) in Dataset to indicate dataset last refresh date,

but I want to keep only date in 'yyy-mm-dd ' format and truncate the timestamp, or if I have to keep timestamp I want it to be at UTC timezone level.

how can I achieve it ? Please help

 

1 Reply
Mattsco
Dataiker

Hi, 

You can use now().toString('yyyy-MM-dd') to keep only the date part. The results are always in local timezone in Formula. 

Mattsco