Re: Selecting by date
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Oct 2005 23:53:24 +0200
On Thu, 27 Oct 2005 14:46:02 -0700, Stan wrote:
>I have a table that has the significant date set up as a CHAR datatype with
>length of 8, i.e 20051027. I want to select all transactions where this date
>equals the system date.
Hi Stan,
SELECT ....
FROM ....
WHERE YourDateColumn = CONVERT(char(8), CURRENT_TIMESTAMP, 112)
But why are you storing a date as a CHAR column, instead of using the
datetime datatype?
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- Prev by Date: Re: password
- Next by Date: Re: Compare Character to numberic
- Previous by thread: Re: password
- Next by thread: Re: Selecting by date
- Index(es):