• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

need to query one day ago....

New Here ,
Mar 29, 2007 Mar 29, 2007

Copy link to clipboard

Copied

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.
TOPICS
Database access

Views

321

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Mar 29, 2007 Mar 29, 2007
You are looking for DateFormat(DateAdd("d", -1, Now()), "mm-dd-yy)

Votes

Translate

Translate
Guest
Mar 29, 2007 Mar 29, 2007

Copy link to clipboard

Copied

You are looking for DateFormat(DateAdd("d", -1, Now()), "mm-dd-yy)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 29, 2007 Mar 29, 2007

Copy link to clipboard

Copied

LATEST
Thanks! 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation