Not exactly. The VFP date() function returns a "date" datatype. The SQL getdate()( function returns a "datetime" datatype. Depending on the version of SQL you're talking to, there is no such thing as a "date" datatype. To go back to Rafael's original question, he'd probably have to use a BETWEEN filter in his SQL as it's unlikely that invdate will return any matching rows when using a direct comparison to the current datetime down to the millisecond.
-- rk -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Stephen Russell Sent: Wednesday, May 11, 2011 1:26 PM To: [email protected] Subject: Re: transact sql On Wed, May 11, 2011 at 12:07 PM, Rafael Copquin <[email protected]> wrote: > What is the transact sql equivalent of the date() function? > > How would you change the following vfp statement into a transact sql > statement? > > select * from invoices where invdate = date() ------------- date() = getdate() -- Stephen Russell Unified Health Services 60 Germantown Court Suite 220 Cordova, TN 38018 Telephone: 888.510.2667 901.246-0159 cell [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD044192415173C@ACKBWDDQH1.artfact.local ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

