Python Forum
Convert date integers (ex. 43831) to regular format
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert date integers (ex. 43831) to regular format
#3
Something like this would be a start...

>>> from datetime import datetime,timedelta
>>> (datetime(1900, 1, 1) + timedelta(days=43831-2)).strftime("%d-%m-%Y")
'01-01-2020'
Reply


Messages In This Thread
RE: Convert date integers (ex. 43831) to regular format - by bowlofred - Nov-15-2020, 11:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare current date on calendar with date format file name Fioravanti 1 231 Mar-26-2024, 08:23 AM
Last Post: Pedroski55
  Python date format changes to date & time 1418 4 611 Jan-20-2024, 04:45 AM
Last Post: 1418
Thumbs Up Convert word into pdf and copy table to outlook body in a prescribed format email2kmahe 1 751 Sep-22-2023, 02:33 PM
Last Post: carecavoador
  Review my code: convert a HTTP date header to a datetime object stevendaprano 1 2,000 Dec-17-2022, 12:24 AM
Last Post: snippsat
  Modifying a date format jehoshua 17 2,981 Oct-29-2022, 08:44 PM
Last Post: jehoshua
  Convert Json to table format python_student 2 5,523 Sep-28-2022, 12:48 PM
Last Post: python_student
  Convert .xlsx to Format as Table bnadir55 0 891 Aug-11-2022, 06:39 AM
Last Post: bnadir55
  Date format error getting weekday value Aggie64 2 1,426 May-29-2022, 07:04 PM
Last Post: Aggie64
  how to convert and format a varable darktitan 4 1,690 May-29-2022, 12:59 PM
Last Post: darktitan
  Convert Date to another format lonesoac0 2 1,672 Mar-17-2022, 11:26 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020