I gotcha now. good idea. thanks I will give it a try

-----Original Message-----
From: Philip Arnold [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 11:35 AM
To: CF-Talk
Subject: RE: SQL date conversion issue

WHERE CASE RIGHT(demographicvaluedesc, 1) WHEN 'M' THEN
convert(datetime, demographicvaluedesc, 109) ELSE convert(datetime,
demographicvaluedesc, 101) end > getdate()-1

What that does is if the date ends in an "M" (AM or PM) then use the
"mon dd yyyy hh:mi:ss:mmmAM (or PM)" conversion, otherwise use
"mm/dd/yy"

A complete list of the codes are here
http://msdn.microsoft.com/library/default.asp?url="">
/ts_ca-co_2f3o.asp

HTH

> -----Original Message-----
> From: Eric Creese [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 11:09 AM
> To: CF-Talk
> Subject: RE: SQL date conversion issue
>
>
> How would suggest using it in this case (parson the pun)?
>
> -----Original Message-----
> From: Philip Arnold [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 9:58 AM
> To: CF-Talk
> Subject: RE: SQL date conversion issue
>
>
> Try using CASE to choose which type of conversion you want then
>
> You can use CASE in all sorts of places, like JOINs, SELECT,
> WHERE and others - a damn useful command <g>
>
>
>
>
>
  _____
[
Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to