Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
NSC | SuiteAnalytics Connect: Convert Date/Time Fields to a 12-Hour Format
By default, SuiteQL returns date/time in 24-hour format. If you want to change this to 12-hour format, you can use the sample query below:
SELECT id, TO_CHAR(createddate, 'YYYY-MM-DD HH24:MI:SS') FROM transaction WHERE id = <transactionID>
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Refer a Member to the Community | Earn the Answer Accepter Badge | Vote for the contents you'd like to see