how get date fromthe long number?

1 view (last 30 days)
Hi,
The following number represent date
1246573330
How get a date from it ? where I tried datenum,datestr, and datevec, but does not working
Thanks
  2 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 23 Aug 2022
Moved: Steven Lord on 23 Aug 2022
D = 1246573330;
DT1 = datetime(D, 'ConvertFrom','datenum')
DT1 = datetime
3413001 CE
DT2 = datetime(D, 'ConvertFrom','excel')
DT2 = datetime
3414901 CE
DT3 = datetime(D, 'ConvertFrom','posixtime')
DT3 = datetime
02-Jul-2009 22:22:10
DT4 = datetime(D, 'ConvertFrom','juliandate')
DT4 = datetime
3408289 CE
.
  10 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!