How to convert the integer date format into YYYYMMDD?

前端 未结 4 740
Happy的楠姐
Happy的楠姐 2020-12-06 10:18

Python and Matlab quite often have integer date representations as follows:

733828.0 733829.0 733832.0 733833.0 733834.0 733835.0 733836.0 733839.0 733840.0 733841.0

4条回答
  •  醉梦人生
    2020-12-06 10:44

    Dates like 733828.0 are Rata Die dates, counted from January 1, 1 A.D. (and decimal fraction of days). They may be UTC or by your timezone.

    Julian Dates, used mostly by astronomers, count the days (and decimal fraction of days) since January 1, 4713 BC Greenwich noon. Julian date is frequently confused with Ordinal date, which is the date count from January 1 of the current year (Feb 2 = ordinal day 33).

    So datetime is calling these things ordinal dates, but I think this only makes sense locally, in the world of python.

提交回复
热议问题