Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WHERE datefield > Yesterday() ???

Status
Not open for further replies.

kermit01de

Technical User
Jan 20, 2002
256
0
0
DE
This is about SQL Anywhere 11 - with Visual Studio 2008 - via ODBC

I try to create a query with filter to a datefield (LAST_CHANGED) > Yesterday.

As from MSSQL I know "Today()-1" --- this does not work here. I also tried "> Dateadd (day, -1, Today())" - Invalid expression

Does anybody have a hint for me, how to do that correctly?

Thank you in advance!

Mirko

Kind regards
Mirko
--------------------------------------
>>>>>> ... I am sure, some supportissues are a matter of PEBKAC ... <<<<<
 
I'm not familiar with any function in MSSQL called "Today()". Have you tried getdate()?
 
Sorry, should be "Now()"

But anyway - I just remembered, I did an export for Sybase SQLAnywhere years ago with VB6 - so I looked up the sourcecode and decided to do it with VB6. Works like a charm ...

So this case may be closed.

Kind regards
Mirko
--------------------------------------
>>>>>> ... I am sure, some supportissues are a matter of PEBKAC ... <<<<<
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top