Recent

Author Topic: default date or null date  (Read 728 times)

andersonscinfo

  • Full Member
  • ***
  • Posts: 141
default date or null date
« on: July 06, 2024, 12:57:11 pm »
Hi, I remember that the null date or when a date is not passed it assumes 0 or 01-12-1899 or something like that, I noticed a strange behavior, my dates when I don't pass anything comes with the year 9999, print attached, you can be something I did?

Thaddy

  • Hero Member
  • *****
  • Posts: 18529
  • Here stood a man who saw the Elbe and jumped it.
Re: default date or null date
« Reply #1 on: July 06, 2024, 01:47:57 pm »
Not that strange, because you are trying to compile for linux and windows:
Unix time starts from 1.1.1970/00.00, the pivot.
Windows time starts from 12/31/1899/23.59  (and that is indeed an error) or on modern Windows 1/1/1601/00:00
you can convert the two if you store or memorize this constant, which is the time difference in nano seconds: 116444736000000000
Given the number of zero's and the four's easy to remember.
« Last Edit: July 06, 2024, 01:53:44 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

andersonscinfo

  • Full Member
  • ***
  • Posts: 141
Re: default date or null date
« Reply #2 on: July 06, 2024, 01:53:14 pm »
ik, thank you.

Att.

 

TinyPortal © 2005-2018