|
|
Hi,
Also, despite spending hours searching, I can't seem to find a way to
display the time, from a smalldatetime field, as:
HH:MM AM/PM
I've tried:
vbShortTime
vbLongTime
...there doesn't appear to be a happy medium, yet it appears to me to be the
most obvious format! Gotta love "code". :o)
Any ideas how I display the time in my (everybody's!) preferred format? I
can't find a function or anything out there, just a lot of scratching of
heads.
Really appreciate any help offered. Thanks.
Nath.
"Dooza" <doozadooza@xxxxxxxxx> wrote in message
news:g6shmr$sq2$1@xxxxxxxxxxxxxxxxxxxxxxxx
> tradmusic.com wrote:
>> I'm passing the following date, via a querystring, to a page that has a
>> recordset containing a smalldatetime field:
>> page.asp?eventdatetime=2008-09-26
>>
>> Problem is, the recordset is either producing no results, despite there
>> being events in the table, on that date. If I change the querystring to
>> any of the following:
>> dd-mm-yyyy
>> dd/mm/yyyy
>> yyyy/mm/dd
>>
>> I get an error about data type mismatch.
>>
>> I know this is something silly...can anyone tell me what I'm doing wrong?
>> Thank you.
>>
>> Regards
>> Nath.
> A querystring is a string value, you need to convert it to a date value
> before the recordset will accept it. Maybe CDATE will do it:
> http://www.w3schools.com/VBscript/func_cdate.asp
>
> Steve
|
|