Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23045
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: Confusion over date |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <McWdncG4nIe8lmXPnZ2dnUVZ_tednZ2d@westnet.com.au> <XnsA2D0942C480Ceejj99@194.109.133.133> <n_CdncEWieq81WXPnZ2dnUVZ_smdnZ2d@westnet.com.au> |
| Date | 2014-02-10 09:56 +0100 |
| Message-ID | <XnsA2D065211FFA9eejj99@194.109.133.133> (permalink) |
Andrew Poulos <ap_prog@hotmail.com> wrote on 10 feb 2014 in
comp.lang.javascript:
> On 10/02/2014 10:54 AM, Evertjan. wrote:
>> Andrew Poulos <ap_prog@hotmail.com> wrote on 10 feb 2014 in
>> comp.lang.javascript:
>>
>>> I'm using jscript in classic ASP to query an SQLServer for a date
>>> var expiry = rs.Fields("ExpiryDay").value;
>>>
>>> If I put the variable into the page with
>>> <%= expiry %>
>>> I get
>>> Mon Feb 10 09:58:15 UTC+1100 2014
>>>
>>> Yet this
>>>
>>> if (expiry) {
>>
>> Some say you need to explicitly create a Date object.
>>
>> var expiry = new Date(rs("ExpiryDay").Value);
>>
>> Try some debugging with this.
>
> Thanks, creating a Date object gave me predictable results.
Probably, like the .Fields, the .Value is default too:
var doomsday = new Date(rs("DoomsDay"));
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Confusion over date Andrew Poulos <ap_prog@hotmail.com> - 2014-02-10 10:09 +1100
Re: Confusion over date "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-10 00:54 +0100
Re: Confusion over date Andrew Poulos <ap_prog@hotmail.com> - 2014-02-10 14:30 +1100
Re: Confusion over date "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-10 09:56 +0100
Re: Confusion over date Andrew Poulos <ap_prog@hotmail.com> - 2014-02-10 21:16 +1100
csiph-web