Re: Date from Number of Days

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: james (jjames700ReMoVeMe)
Date: 02/02/05


Date: Tue, 1 Feb 2005 21:57:37 -0600

Jay, FINALLY a response from a Dataflex developer that makes some sense and gives good info on the dates. Here is a copy of a
response to my post of Data Access's Newsgroup:

___________________________________________________________

James - I think you'll find that the dates are really just integers (AKA
Julian Dates). Any DF programmer who did Y2K work knows the infamous
693975. That's the value for 01/01/1900. Now - you'll also have to test to
make sure all dates are 4 year or 2 year. If 2 year, add the 693975 to' em,
then they'll be 4 year.

So - you've got a bunch of integers, now what? Since this is going to
Access, you could use VB:
--------------
Dim StartingDate as Date, BuildDate as Date, IntValue as Integer,
DFDateValue as Single
StartingDate=DateValue(1900,01,01) 'I think I have the syntax/command
right here - check it!!

'fill DFDateValue with the value from the DF database

IntValue=DFDateValue - 693975 'this will get it down to integer size for
VB

'maybe do some error checking to see if it's > zero

BuildDate = DateAdd(StartingDate,"d",IntValue) 'I think I have the syntax
right here - check it!!

'set the db date to BuildDate
--------------

Please note that my VB may be rusty - so try this at your own risk!

Don't know if this'll work for you - but maybe it's a starting point.

Garret
_____________________________________________________________

The fact that the system is using Julian Dates leads to a better understanding of what is going on.
What do you think Jay ?
james



Relevant Pages

  • RE: Book on Pre-MATH for cryptography and cryptanalysis. Reply
    ... She will indirectly charge due to Jay when the preliminary ears ... concern in response to the secure morning. ...
    (sci.crypt)
  • Re: Entropy sources under WinXP
    ... It died, you injured, yet Geoffrey never overnight meeted in response to the ... I'll reserve again or Jay will owe the ...
    (sci.crypt)
  • Re: pass datatable in event or grab from property or pass in function?
    ... Please read my response to Jay B. Harlow. ... > various times (not just once after the construction of the object), ... The developer will always have a need to ... Again, please read my post to Jay, as it is directed to the both of you. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Startup programs
    ... > remove programs that startup when I first log on to windowsxp? ... > appreciate your time...also got this OEM version of Winxp with my ... response to me or a response to Jay. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Date from Number of Days
    ... Jay, here is what I have managed to get going so far, but, it still gives wrong dates. ... Dim StartingDate As Date ... Dim BuildDate As Date ... > What I'm curious about is given your three bytes, how do you get the DFDateValue value? ...
    (microsoft.public.dotnet.languages.vb)