It’s sometimes frustrating when you upload an Excel file into a third party tool that enhances your data exploration experience, however, a date field is imported as a number that is most probably found in the forty-thousands.
We’ve come across this frustration multiple times and although Savant has been developed to identify the most appropriate data type to assign to fields uploaded into datasets, Excel still might triumph.
Here is our suggestion - using the below formula, replace the
‘Field’ value with your Excel date field that is input as an Integer or Number.
TO_DATE- converts your expression to date type
'Field'- your Excel date field
Step-by-step guide to converting Excel Epoch Time to Dates in Savant
Open your dataset in Savant and add a Transform tool after your dataset.
Click on the +Column to open the expression editor.
In the formula editor, enter the following formula, replacing
‘Field’with the name of your Excel date field:
Confirmto apply the formula to the new field.
The new field will now reveal dates in date type format instead of Epoch Time.
Note that you should use the numbers we suggest in the above formula. They are static across Microsoft Excel and convert Excel time to generic Epoch time which Savant then converts to a date format.
If your Excel date was input as a String type, use the
TO_INT() functions to convert it to a number first.
Alternatively, you may also use the
TO_DATETIME() function found in the Savant function suite.
We hope this helps you solve your Excel date woes! If you have any questions or comments, please reach out.