DateTime in Export using OQL

Hi everyone, i exported a table via OQL. In my result i get the DateTime Column as long int. If i import this csv in Excel i can't convert the long into DateTime. How do i get the DateTime Values exported, so that i can handle them in e.g. Excel?    
2 answers

You could cast to string if all you need is for it to be human readable, like:

SELECT CAST(alias/DateTimeAttribute AS String) AS ColumnName


or in Excel use a function to convert (not sure why you couldn't), like if your date is in cell A1:

=A1/(24*60*60*1000) + DATE(1970, 1, 1)

and format the column with the results as Date and/or Time.


Hi Martin,

sorry for my late response.

Thanks a lot for your answers.

They work fine. Thanks again!!