using suiteQL how do I get the date-time from a fi...
# ask-stanley-ai
m
using suiteQL how do I get the date-time from a field on a record. Currently it only gives me the date but no timestamp.
c
AI generated answer (using internal Slack threads):
In SuiteQL, the
createddate
field only returns the date, not the time. However, you can use the
TO_CHAR
function to format the
createddate
field to include the time. Here is an example:
Copy code
sql
SELECT TO_CHAR(createddate, 'YYYY-MM-DD HH24:MI:SS') FROM transaction
This will return the
createddate
field in the format 'YYYY-MM-DD HH24MISS', which includes the date and time. Please note that the time is in 24-hour format. If you want the time in 12-hour format, you can use 'HH12MISS' instead of 'HH24MISS'. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828526556
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825165272
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823433161
Please provide your feedback on this answer.