ODBC provides a function, Left, that can be used to pull just the date portion of a date-time value. Note that the result is a character expression.
For example, if a date of birth column contains the value "08-Jan-1962 12:00:00", the ODBC command:
[tt]select {fn left(dob, 10)} from MyTable[/tt]
will yield only "08-Jan-1962".
As with all ODBC scalar functions, be sure to use the curly braces {} in the appropriate places, as the ODBC driver looks for these to indicate the section that the driver should interpret.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.