ORDER BY not working
am 01.10.2006 18:12:16 von SLH
This is a multi-part message in MIME format.
------=_NextPart_000_0032_01C6E552.D6113A10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
i have an asp page that writes to an access db that will hold 2 fields, =
NAME, DATE. the date is written to the DB simply by using the value of =
Now() which gives me date and time like this: 10/1/2006 12:09:52 PM
this is good, and is what i want. but apparently i cant ORDER BY this =
value. does anyone know of a better way i can do this? i need the =
records ordered by date when they are written to the page.
thank you
------=_NextPart_000_0032_01C6E552.D6113A10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">
i have an asp page that writes to an =
access db that=20
will hold 2 fields, NAME, DATE. the date is written to the DB simply by =
using=20
the value of Now() which gives me date and time like =
this:=20
10/1/2006 12:09:52 PM
this is good, and is what i want. but =
apparently i=20
cant ORDER BY this value. does anyone know of a better way i can do =
this? i need=20
the records ordered by date when they are written to the =
page.
thank you
------=_NextPart_000_0032_01C6E552.D6113A10--
Re: ORDER BY not working
am 01.10.2006 18:21:40 von exjxw.hannivoort
SLH wrote on 01 Oct 2006 in microsoft.public.inetserver.asp.db:
> i have an asp page that writes to an access db that will hold 2
> fields, NAME, DATE. the date is written to the DB simply by using the
> value of Now() which gives me date and time like this: 10/1/2006
> 12:09:52 PM
Do not store the datetime in a string field, but in a datetime field ...
> this is good, and is what i want. but apparently i cant ORDER BY this
> value. does anyone know of a better way i can do this? i need the
> records ordered by date when they are written to the page.
.... and 'order by' will work as expected.
> thank you
>
> ------=_Nex tPart_000_0032_01C6E552.D6113A10
>
>
Please do not use html on usenet!!!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: ORDER BY not working
am 01.10.2006 19:54:48 von Oliver Weichhold
"Evertjan." wrote in message
news:Xns984FBACAF519Ceejj99@194.109.133.242...
> SLH wrote on 01 Oct 2006 in microsoft.public.inetserver.asp.db:
>
>> i have an asp page that writes to an access db that will hold 2
>> fields, NAME, DATE. the date is written to the DB simply by using the
>> value of Now() which gives me date and time like this: 10/1/2006
>> 12:09:52 PM
>
> Do not store the datetime in a string field, but in a datetime field ...
>
>> this is good, and is what i want. but apparently i cant ORDER BY this
>> value. does anyone know of a better way i can do this? i need the
>> records ordered by date when they are written to the page.
>
> ... and 'order by' will work as expected.
>
>> thank you
>>
>> ------=_Nex tPart_000_0032_01C6E552.D6113A10
>>
>>
>
> Please do not use html on usenet!!!
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
that appears to work, thank you. so the date/time field has no problem
storing the value of Now()? i only ask because it says the field can hold 8
bytes, and Now() should be more than 8 bytes.... so what am i missing?
thanks again
Re: ORDER BY not working
am 01.10.2006 20:10:27 von exjxw.hannivoort
SLH wrote on 01 Oct 2006 in microsoft.public.inetserver.asp.db:
>> Do not store the datetime in a string field, but in a datetime field
>> ...
>>
>>> this is good, and is what i want. but apparently i cant ORDER BY
>>> this value. does anyone know of a better way i can do this? i need
>>> the records ordered by date when they are written to the page.
>>
>> ... and 'order by' will work as expected.
>
> that appears to work, thank you. so the date/time field has no problem
> storing the value of Now()? i only ask because it says the field can
> hold 8 bytes, and Now() should be more than 8 bytes.... so what am i
> missing?
Now() returns a date/time type variable value in an internal format,
that only appears as a string when you put it in a string,
and even then it does so according to the server's regional settings.
The SQL string when excuted will reconstruct the the internal format of the
database according to the same regional setting rules, IMHO.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)