|
-
Feb 19th, 2003, 07:58 AM
#1
Thread Starter
pathfinder
-
Feb 19th, 2003, 09:23 AM
#2
The textdate correlates with the numeric date, if you count by seconds (it's 8 seconds of, but did you get the correct time for the textdate?). Just look at the difference from both ( Numeric diff= 247688 ; Textdate diff 68:48 hrs in seconds 247680 ).
If you use 365days/year the 0 would be 1.1.1970
And the HEX value is just the same as Numeric just in Hex
Last edited by opus; Feb 19th, 2003 at 09:28 AM.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Feb 19th, 2003, 01:36 PM
#3
Thread Starter
pathfinder
You're right.
The Hex is the same as the numeric.
I created the numeric from the hex.
So, in this instance, the only algorythm I would need would be an accurate seconds to Date mapper, takeing into consideration leap years.
Thanks!
-Lou
-
Feb 20th, 2003, 11:26 AM
#4
Frenzied Member
How dates are stored internally varies by OS or database.
For example in Windows:
File date & time is a quadword (two longs). It is the number of milliseconds since Jan 1, 1970.
In VMS:
File date & time is a quadword, starting Nov 17, 1858.
In Oracle: DATE datatype is
An octaword milliseconds starting from 01-JAN-4712 BC - time zero for the standard Julian calendar
In other words, there is NO portability for any kind of date
variable processing fromsystem to system.
-
Feb 20th, 2003, 12:19 PM
#5
In Oracle: DATE datatype is
An octaword milliseconds starting from 01-JAN-4712 BC - time zero for the standard Julian calendar
I'm wondering what they did measure in milliseconds back in 4712 BC ;-)
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Feb 22nd, 2003, 11:19 AM
#6
Thread Starter
pathfinder
Well, That was simple!
The complete Text Date, as viewed in a text log file created by the job logger, of which extracts the data from the binary logging files that I'm cracking, were:
2/12/2003 13:31 ==> "Job Submission Date = February 12, 2003 13:31:29"
2/15/2003 10:19 ==> "Print Completion Date = February 15, 2003 12:30:51"
so, useing the full "Job Submission Date" as an initial anchor, and useing the DateAdd function, subtracting the seconds value of that date, I create a Date_Zero base.
Then, adding the seconds value of the "Print Completion Date" that I extracted out of the Binary data file to the Date_Zero, I do indeed get "Saturday, Feb 15 2003, 10:19:37 AM", exactly what I want.
cool!

VB Code:
Private Sub Command1_Click()
MsgBox Format(DocuSP_Date("1045322377"), "dddd, mmm d yyyy, hh:mm:ss AMPM")
End Sub
Private Function DocuSP_Date(ByVal In_Secs As String) As Date
Dim Date_Zero As Date
Dim Ref_Date As Date
Dim Ref_Secs As String
Ref_Date = CDate("February 12, 2003 13:31:29")
Ref_Secs = "-1045074689"
Date_Zero = DateAdd("s", Val(Ref_Secs), Ref_Date)
DocuSP_Date = DateAdd("s", Val(In_Secs), Date_Zero)
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|