Convert Exif date to different format

2019-09-15 01:16发布

问题:

I am getting an exif date value like

EXIFPhotoDate: 1506173228000 and
UploadDate: 1506485214000

but I know it is

EXIFPhotoDate   23/9/2017, 23:27 and 
UploadDate  9/27/2017, 01:59

The former is when queried via REST and the latter is when queried via the table.

How can I get standard date/time from a value like this?

回答1:

Looks like you have a number of milliseconds since January 01 1970 in UTC. If you remove the 000 from the end, you will have a Unix timestamp, that is, the number of seconds since January 01 1970 in UTC:

unixTimestamp = 1506173228000 / 1000

Once your question doesn't state any programming language, it's hard to give you further help.



标签: rest datetime