return yesterdays date?

From: Brandon Coale (Coale_at_discussions.microsoft.com)
Date: 08/23/04


Date: Mon, 23 Aug 2004 10:25:01 -0700

Hello,

I am using a SQL statement through an ODBC driver to return the records
who's date field contains yesterday's date. I am hardcoding the date such as:
SELECT *
FROM table
WHERE departure = {d'2004-08-22'}

Instead of hardcoding the date, I'd like some code that would evaluate to
yesterday's date automatically.

I am wondering if anyone has any example code that does this.

Thank you.



Relevant Pages

  • Re: return yesterdays date?
    ... "Brandon Coale" wrote: ... BC> I am using a SQL statement through an ODBC driver to return the ... BC> Instead of hardcoding the date, I'd like some code that would ...
    (microsoft.public.data.odbc)
  • Re: return yesterdays date?
    ... Are you using SQL Server? ... > I am using a SQL statement through an ODBC driver to return the records ... > Instead of hardcoding the date, I'd like some code that would evaluate to ...
    (microsoft.public.data.odbc)
  • Re: return yesterdays date?
    ... I'm using an odbc driver provided by the database vendor I'm connecting ... and has a ODBC compliant driver. ... >> Instead of hardcoding the date, I'd like some code that would evaluate to ...
    (microsoft.public.data.odbc)