Thanks, Pal,
I tried that and got an error, which led my down the road to using TO_DAYS()
etc...
Will try again, and post the error if it reoccurs.
Best,
Nick

Pal Wester wrote:

> Actually, there should be a function which does the oposite
> of the DATE_FORMAT function, ie. converting a string to date.
>
> but as long as you use mysql notation on dates, you can write
> ...WHERE myDateField > '2001-02-14';
>
> As I'm in norway and wriote norwegian applications I usually get dates
> on the form dd.mm.yyyy and have to convert it into yyyy-mm-dd in
> programming before the sqlstatement... so a TO_DATE('14.02.2001',
> 'dd.mm.yyyy')
> like oracle would be nice...
>
> mvh:
> Pal Wester, programmerer
> never.no as, stortingsgt 30, 0161 Oslo
> tlf: 22 01 66 20, fax: 22 01 66 21
> direkte: 22 01 66 34, 906 900 62
> http://never.no - icq:103476059
> ~ hvis du ikke klarer det pa sorste forsok vil jeg ikke anbefale hangliding
> ~
>
> > -----Opprinnelig melding-----
> > Fra: Nick Didkovsky [mailto:[EMAIL PROTECTED]]
> > Sendt: 19. februar 2001 14:53
> > Til: mysql
> > Emne: Comparing dates
> >
> >
> > Hello,
> >
> > Is there a more general way to compare DATE values than the following.
> >
> > ...WHERE TO_DAYS(myDateField) > TO_DAYS('2001-02-14');
> >
> >
> > I really have to objection to converting to a common unit of days in
> > order to compare (as long as I don't care about comparing times within
> > the same day), but I imagined there would be a more general DATE type
> > that could be compared uniformly, and a hypothetical TO_DATE() function
> > that would cast appropriately.
> >
> > Something that would accomodate the following:
> >
> > ...WHERE TO_DATE(myDateField) > TO_DATE('1997-10-04 22:23:00')
> >
> > as well as:
> >
> > ...WHERE TO_DATE(myDateField) > TO_DATE('1997-10-04')
> >
> > You get the idea... thoughts?
> >
> > Best,
> > Nick
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> > <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to