Main Board > ODBC

DATE field query

(1/1)

mm_coder:
Using a select against a table column in DATE FORMAT.
SO_SalesOrderHeader.OrderDate

returns this 9/30/2020 12:00:00 AM
Any way to format the return value as?  9/30/2020
I have the ODBC manual, but can't figure it out.
Thanks

Devon Austen:
You can use a Scalar functions (https://manual.pvxplus.com/?odbc/using_odbc_driver/scalar_functions.htm) to modify what is returned by the select:

SELECT LEFT(SO_SalesOrderHeader.OrderDate, POSITION(" " IN SO_SalesOrderHeader.OrderDate) - 1) From myTable

Navigation

[0] Message Index

Go to full version