ID: Q103576
2.50 2.50a 3.00| 2.50 2.50a
WINDOWS        | MS-DOS
The information in this article applies to:
The Microsoft FoxPro Connectivity Kit can be used with FoxPro versions 2.5 and 2.5a for MS-DOS and Windows. The FoxPro Connectivity Kit, and the Open Database Connectivity (ODBC) specification in general, supports the minimum ANSI SQL standard. Below is a list of the SQL date and time functions that are supported.
The following table lists the supported date and time functions.
Parameter arguments listed as DATE_EXP can be a date-type column name, a date literal, or a date type result from another function call.
Parameter arguments listed as TIME_EXP can be a column name, a time literal, a timestamp, or results from another function call.
   Function                  Description
   ------------------------------------------------------------------
   NOW()                     Returns the current date and time as a
                             timestamp value.
   CURDATE()                 Returns the current date.
   DAYOFMONTH(date_exp)      Returns the day of the month in DATE_EXP
                             as an integer value ranging from 1-31.
   DAYOFWEEK(date_exp)       Returns the day of the week in DATE_EXP
                             as an integer value ranging from 1-7,
                             where 1 refers to Sunday.
   DAYOFYEAR(date_exp)       Returns the day of the year in DATE_EXP
                             as an integer value ranging from 1-366.
   MONTH(date_exp)           Returns the month in DATE_EXP as an
                             integer value ranging from 1-12.
   QUARTER(date_exp)         Returns the quarter in DATE_EXP as an
                             integer value ranging from 1-4.
   WEEK(date_exp)            Returns the week in DATE_EXP as an
                             integer value ranging from 1-12.
   YEAR(date_exp)            Returns the year in DATE_EXP as an
                             integer value.
   CURTIME()                 Returns the current local time as a time
                             value.
   HOUR(time_exp)            Returns the hour in TIME_EXP as an
                             integer value ranging from 0-23.
   MINUTE(time_exp)          Returns the minute in TIME_EXP as an
                             integer value ranging from 0-59.
   SECOND(time_exp)          Returns the second in TIME_EXP as an
                             integer value ranging from 0-59.
   result=DBEXEC(mhand, "SELECT {fn NOW()}","output")
   result=SQLEXEC(mhand, "SELECT {fn NOW()}","output")
Microsoft Open Database Connectivity Software Development Kit (SDK) "Programmer's Reference," version 1.0, pages 527-528
Additional reference words: VFoxWin 3.00 FoxWin FoxDos CK 2.50 2.50a KBCategory: kbtool kbinterop kbprg kbref KBSubcategory: FxtoolCk
Keywords          : FxtoolCk 
Version           : 2.50 2.50a 3.00| 2.50 2.50a
Platform          : MS-DOS WINDOWSLast Reviewed: April 30, 1996