PxPlus User Forum

Twitter Twitter Twitter

Author Topic: DATE field query  (Read 651 times)

mm_coder

  • Member
  • **
  • Posts: 5
    • View Profile
DATE field query
« on: February 27, 2023, 07:52:24 PM »
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

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: DATE field query
« Reply #1 on: February 28, 2023, 08:26:34 AM »
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
Principal Software Engineer for PVX Plus Technologies LTD.