Re: convert date from VB to java



David McDivitt wrote:
>> From: "Jim Mack"
>> 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.


Maybe I'm just being dense, but if you know the format of the data, and you know the location of the data, then what is it you need help with? VB dates are OLE dates, and I've told you how they're formatted, so...?

--
Jim


>
> /* 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 */
.



Relevant Pages

  • Re: Cpp Considered Harmful
    ... >> I will observe that many Java IDEs do this rather successfully. ... > Look, if a tool author is willing to fully parse the underlying language, ... > compiler version. ... mentions a header file is in the C compatability appendix. ...
    (comp.lang.cpp)
  • Re: Add a header line with postfix
    ... a header issue that a java application is giving me. ... always POPing from a single mailbox, or could it POP from various ... if you just want to add a header when you know the ... the $recipient must be the recipient, so that the application can treat ...
    (Debian-User)
  • convert date from VB to java
    ... I need to read files written by a VB program with java. ... fixed length header then a variable length portion. ... are dates and pointers to text in the rest of the file. ... able to read and interpret the pointers and strings. ...
    (microsoft.public.vb.general.discussion)
  • Re: convert date from VB to java
    ... >> I need to read files written by a VB program with java. ... >> in the header are dates and pointers to text in the rest of the file. ... I cannot interpret the eight bytes for a date data type, ...
    (microsoft.public.vb.general.discussion)
  • Re: JTextArea - how to create it so it just fits the text ?
    ... Now, with all this Java technology, the kind of semi-generated GUI I was ... b - how to loop through all permutations will take a bit of thought. ... >>header rows but let the column header wrap and assume the minimum width ...
    (comp.lang.java.gui)

Loading