ORDER BY not working
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>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 <STRONG>Now()</STRONG> which gives me date and time like =
this:
<STRONG>10/1/2006 12:09:52 PM</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>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.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thank you</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0032_01C6E552.D6113A10--
Re: ORDER BY not working
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
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
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
"Evertjan." <exjxw.hannivoort [at] interxnl.net> wrote in message
news:Xns984FBACAF519Ceejj99 [at] 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
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>> <HTML><HEAD>
>
> 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
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)