The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Excel Convert Date To Number in Vertica

Hi all,
I need to convert the date to a number the same as the excel formula does.
for example, the cell with value: 2021-03-14 11:20:00 -> convert to number format the result is : 44269.472225625
if I do this in Vertica: SELECT TIMESTAMPDIFF(SECOND ,'1900-01-01 00:00:00', '2021-03-14 11:20:00'::TIMESTAMP)/(86400)
I get the result 44267.4722222222
there is a better solution?
link to excel doc:https://www.myonlinetraininghub.com/excel-date-and-time
0
Answers
Ok thank you very much!!
You could create cool little User Defined SQL Function