Hi Johny,
Try to use the following:
WHERE registration_date BETWEEN #CreateODBCDate(Now())# AND 
#CreateODBCDate(Now())# 
 
====================
Jura Khrapunov
United Nations Development Programme
www.undp.org/europeandcis

________________________________

From: Johnny Le [mailto:[EMAIL PROTECTED]
Sent: ut 29. 3. 2005 21:41
To: SQL
Subject: select where date = today date?



Hi,

I need to select all accounts registered today. I currently use:
WHERE datepart(yy, registration_date) = #dateformat(now(), "yy")# and
datepart(mm, registration_date) = #dateformat(now(), "mm")# and
datepart(dd, registration_date) = #dateformat(now(), "dd")#

This works, but I figure there must be a shorter way to do it.  The 
registration_date is a datetime(8) type.  I tried registration_date = #Now()#.  
I tried registration_date=#dateformat(Now(), "mm/dd/yyyy")# but none of them 
work.  Please let me know if you have a better to do it.

I am using SQL server 2000 and ColdFusion MX 6.1.

Johnny



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2225
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to