comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Error in function js2ymds (JHU/APL/S1R IDL Lib)?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Error in function js2ymds (JHU/APL/S1R IDL Lib)? [message #26712 is a reply to message #26584] Fri, 14 September 2001 03:14 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Olaf Stetzer wrote:
>
> Reimar Bauer schrieb:
>>
>> Olaf Stetzer wrote:
>>>
>>> Hello,
>>>
>>> as mentioned in my last posting I want to convert
>>> Date/Time from Microsoft(Excel)-Format (based on
>>> 1.1.1900= day 1) into Julian Seconds and then from JS
>>> into the ODBC-SQL-TIMESTAMP-struct.
>>>
>>> For the last conversion I've written a function
>>> which basically runs js2ymds to get the values
>>> for y m d and then computes hh mm ss from the
>>> resulting seconds.
>>>
>>> All values are then stored in the aforementioned struct.
>>>
>>> I now tried to compute the js from MS-Format and then
>>> use my function to store this in the sqlstruct:
>>> ---
>>> function mstime2sqlts, msdate, mstime
>>>
>>> jsdate=(msdate-1)*86400d0-3155673600d0
>>> js=mstime*86400d0+jsdate
>>> sqlts=js2sqlts(js)
>>> return, sqlts
>>>
>>> end
>>> ---
>>
>> Dear Olaf,
>>
>> We are calculating the jstime from Microsoft special time in this way
>>
>> js_time= mstime*24d*3600+xls2js(msdates)
>>
>
> Are you sure that this function is aware of the 29.2.1900-bug in
> ms-date? By looking at the code for xls2js I am not sure about this!
>
> Olaf
>

I have tested it with some of your data and I got the right days back.
And the routine is tested since 1998 many time by others too.

Reimar
--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multi-threaded IDL
Next Topic: phase unwrapping

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:31:37 PDT 2025

Total time taken to generate the page: 0.49763 seconds