Date Time convert to Microsoft Access
-
How do I get for example this date/time (06.11.2000 03:00:00)
in Micropython so converted
Microsoft Access, date/time (36836,125)
Does anyone know how this works?
I would be very grateful for your cooperation. -
Not really sure what it is you want to do?
If you want timestamps you can use the RTC:
https://docs.pycom.io/firmwareapi/pycom/machine/rtc/#appIf you want it on another format, you can use the datetime library from micropython-libraries-master, where there is a isoformat() method to convert to ISO / UTC timestamp.
-
@Wolli01 Microsoft access date/time is the number of days since December 30, 1899.
So you can:
- Parse the various fields of your date (day, month, year, hours, minutes, seconds)
- Use
utime.mktimeto convert that to a timestamp (seconds since 1/1/1970) - Divide by 86400 (seconds in a day)
- Add the right offset (the number of days between 30/12/1899 and 1/1/1970)
-
@jcaron thank you
-
@railmonitor thank you
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login