Re: Date extraction
- From: "Jeff Johnson" <i.get@xxxxxxxxxxx>
- Date: Wed, 30 May 2007 09:32:53 -0400
"Luiz Horacio" <lhoracio@xxxxxxxxx> wrote in message
news:%23MIACjnoHHA.3264@xxxxxxxxxxxxxxxxxxxxxxx
One (in fact two) stupid questions. I have a date/time field in a
database. Data is, of course, saved as '2007-05-30 01:55:35' format. I
have some queries that include this field, and can't find a clean way to
work with it.
If this is a true date field then data is NOT stored with ANY format.
Formats are for display, which is to say, formats are for strings. Numbers
are numbers are numbers are numbers.
2. Can I work with date part so a query like "... Where AdmDate between
'2007-05-28' and '2007-05-30' And..." will work without the need to add
hours and minutes (like "... Where AdmDate between '2007-05-28 00:00:00'
and '2007-05-30 23:59:59' And...")?
Nope. It's just a fact of life. You'd think after so many iterations of SQL
Server and the like that there would be built-in functions for this but
there aren't. We all have to tack on the 11:59:59 PM, so welcome to the
club.
.
- Follow-Ups:
- Re: Date extraction
- From: Steve Gerrard
- Re: Date extraction
- From: Max Kudrenko
- Re: Date extraction
- References:
- Date extraction
- From: Luiz Horacio
- Date extraction
- Prev by Date: Re: resource template?
- Next by Date: Re: Date extraction
- Previous by thread: Re: Date extraction
- Next by thread: Re: Date extraction
- Index(es):
Relevant Pages
|