I want to convert numbers like 1217508668 to date and time
How to convert numbers like 1217508668 to date and time
Collapse
X
-
-
Thank you too much, your fast reply,, OK, Look, I've a sql database table contains field named open_date all records shown are like 10 digits which appeared in the htmpl pages like mm/dd hh:mm.. So i want extract a report that can display these digits to be like mm/dd hh:mm....
Thank you in advance your tries,,Comment
-
-
If it is a unix timestamp you need to add 1/1/1970 to get the date.
Then use CONVERT to format the date
Code:SELECT CONVERT(VARCHAR(DATEADD(SS,{1217508668},'19700101'),109))
But this is a string format.
To get to SQL Server format CAST AS DATETIME is needed
Not sure about Crystal ReportsComment
Comment