AFAIK, ParseDate parses just the date portion, and I'd simply treat
the result on the time fields as "undefined". Best practice:
dim d as Date
if ParseDate(myDateStr, d) then
d.Hour = 0
d.Minute = 0
d.Second = 0
else
d = nil
end if
return d
I wrote my own time- and datetime parsing function, along with a few
pretty smart date parsing functions -- you know my address if you're
interested :)))
Cheers,
Frank+++
Am 13.12.2006 um 23:48 schrieb Michael:
oops..I wish I could say send the earlier one back!!! :-)
I am not sure if this has been seen by others, but I think under
some circumstances, Parsedate works differently under Mac and Windows.
This is the function call:
d As new date
d.TotalSeconds= d.RetTotalSeconds(puDay.Text+"/"+puMonth.text
+"/"+puYear.text,puStHr.text ,puStMin.text)
In a module:
function (extends d As date, theDate as string, theHrs as string,
theMins as string) as double
if (not ParseDate(theDate, d)) then
end if
d.TotalSeconds = d.TotalSeconds+3600*CDbl(theHrs)+60*CDbl(theMins)
Return d.TotalSeconds
If the date is NOT the current date, works on both platforms,
(returns a date object at midnight) but if the date is the current
date, parsedate returns
=midnight on the Mac
= the current time on Windows.
Is this known ?
tks
--
Günter Schmidt & Co. oHG
Frank Bitterlich eMail: [EMAIL PROTECTED]
Ben-Gurion-Ring 21 WWW: http://www.gsco.de/
D-60437 Frankfurt Tel.: 069 / 156809-29
GERMANY Fax: 069 / 156809-28
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>