ben
ben

Reputation: 111

Convert date and time fields to timestamp

I am working with a SQL Server table that shows date modified and time modified in two separate columns. I need to combine the two fields into a timestamp format, so that I can get a max date for future reloads (not having to load the entire database each day).

The issue is that the time is not displayed in normal hh:mm:ss format - it is a number (e.g. 3591859). I have added a screenshot of the field, type, etc. (for what it is worth).

enter image description here

Upvotes: 0

Views: 824

Answers (1)

Ed Bangga
Ed Bangga

Reputation: 13006

seems an epoch time.

select  concat(AUDTDATE, ' ', cast(dateadd(second, AUDTTIME,'00:00:00') as time))

Upvotes: 1

Related Questions