Saturday, March 27, 2010

need to query one day ago....

Hi all...



I am trying to run a query which will pull records inserted
yesterday and today. I have the today figured out, however was
wondering if anyone has a simple solution to the yesterday. My
current query is:



SELECT id2,dateofinsert

FROM dbo.tbl_parv2

WHERE (dateofinsert = '#dateformat(now(),'mm-dd-yy')#' ')



Thanks.need to query one day ago....
You are looking for DateFormat(DateAdd(''d'', -1, Now()),
''mm-dd-yy)need to query one day ago....
Thanks! :)

No comments:

Post a Comment