Mole
Sat May 12 07:45:35 CDT 2007
pretty big attitude for a guy that lives in a place that still has a king
and queen
unfortunately for you, the US IS the king... so most likely youll have to
keep dealing with what we decide works best
:)
"Dr J R Stockton" <jrs@merlyn.demon.co.uk> wrote in message
news:XlebECgxhMRGFwK4@invalid.uk.co.demon.merlyn.invalid...
> In microsoft.public.scripting.vbscript message <eT0Zbm1kHHA.568@TK2MSFTN
> GP02.phx.gbl>, Thu, 10 May 2007 19:19:04, Mole Man <m@m.m> posted:
>>i need to use datediff to calculate the difference in minutes between
>>Now() and a date returned from a 3rd party object.
>>
>>Now() returns the date as: "5/10/2007 7:15:42 PM"
>
> No, it does not. It returns a CDate, which (alien terminology?) is a
> Variant holding an IEEE Double of days, with 1899-12-30 00:00:00 LCT =
> 0.0.
>
> When the VBS system performs a default conversion of a CDate to a CStr
> string, it does so in accordance with OS settings. Currently I get
> "2007-05-11 20:35:05". You are getting an FFF date, so presumably have
> chosen or accepted settings preferred by the less thoughtful Americans.
>
>
>>my object returns it as: "Thu, 10 May 2007 19:13:09 -0400"
>
> Presumably as a string. But is -0400 necessarily your own local offset,
> or is it the offset at some other place where the date were originated?
> You may need to correct that 19:13:09 to your own local time, with due
> allowances for DST and the fact that even in the US DST does not change
> everywhere simultaneously.
>
>>datediff chokes on this. is there any way i can convert that ugly date
>>to one that datediff can use? please say yes and give me an example
>
>
> If you and your applications were to use the applicable international
> standard to get date/time formats, you would not have all these
> problems. The rest of us laugh at you people suffering for your own
> follies, as a partial recompense for the troubles we expect and get when
> using software originated in the USA.
>
> Remove the redundant day-of-week; separate the offset; the remainder
> will be accepted by CDate. Now correct that CDate by the difference
> between the given offset and your current local one, if it may be non-
> zero.
>
> --
> (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE
> 6.
> Web <URL:
http://www.merlyn.demon.co.uk/> - w. FAQish topics, links,
> acronyms
> PAS EXE etc : <URL:
http://www.merlyn.demon.co.uk/programs/> - see
> 00index.htm
> Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm
> etc.