Re: convert date from VB to java
- From: David McDivitt <x12code-del@xxxxxxxxxxxxx>
- Date: Fri, 16 Sep 2005 09:07:12 -0500
>From: "Jim Mack" <jmack@xxxxxxxxxxxxxxx>
>Date: Fri, 16 Sep 2005 09:25:03 -0400
>Lines: 25
>
>David McDivitt wrote:
>> I need to read files written by a VB program with java. The files
>> have a fixed length header then a variable length portion. Contained
>> in the header are dates and pointers to text in the rest of the file.
>> With java I've been able to read and interpret the pointers and
>> strings. I cannot interpret the eight bytes for a date data type,
>> though. Help would be appreciated. Thanks=20
>
>
>They could be anything, but if they're OLE dates they're =
>double-precision floating point values. The integer portion is the =
>sequential day number since December 30, 1899, and the fractional part =
>is the portion of the day since midnight: 0.25 is 1/4 of a day, or 6AM, =
>etc.
>
>Otherwise, you're going to have to post some data or show us how these =
>are laid out. Give us several examples and, if possible, what dates you =
>think they represent.
Thanks Jim. The VB program is mine and I am writing a java app to display
some things. The java app cannot read the LAN path where the data files are
directly, but can fetch them with FTP, then read them. Dates written in the
files are the standard VB date data type. The user defined type written to
the front of the file as a header is pasted below. Offsets were calculated
and work real well for java interpretation.
/* Public Type ProcRec
LastScanTime As Date 000-007
NextExecuteTime As Date 008-015
NextExecuteTimeSet As Integer 016-017
MinutesToRun As Long 018-021
TaskID As Double 022-029
ID As String * 4 030-033
ProcScheduler As String * 1 034-034
ProcName As String * 30 035-064
Active As Integer 065-066
PassArguments As Integer 067-068
OwnSection As String * 4 069-072
OwnUnit As String * 4 073-076
Executable As String * 256 077-332
ExecutableType As Integer 333-334
TextOffset(60, 1) As Long 335-822
End Type */
.
- Follow-Ups:
- Re: convert date from VB to java
- From: Jim Mack
- Re: convert date from VB to java
- References:
- convert date from VB to java
- From: David McDivitt
- Re: convert date from VB to java
- From: Jim Mack
- convert date from VB to java
- Prev by Date: Re: Trapping Mouse Movements in Picture Box
- Next by Date: can't find entry point in external dll
- Previous by thread: Re: convert date from VB to java
- Next by thread: Re: convert date from VB to java
- Index(es):
Relevant Pages
|
Loading