Re: Date from Number of Days
From: james (jjames700ReMoVeMe)
Date: 02/02/05
- Next message: Tee: "Can we use thread.start on function that has return value?"
- Previous message: Jay B. Harlow [MVP - Outlook]: "Re: declaring array of type Dim q As Double(,)"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: Date from Number of Days"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: Date from Number of Days"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: Date from Number of Days"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Tee: "Can we use thread.start on function that has return value?"
- Previous message: Jay B. Harlow [MVP - Outlook]: "Re: declaring array of type Dim q As Double(,)"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: Date from Number of Days"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: Date from Number of Days"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: Date from Number of Days"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|