• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 916
  • Last Modified:

Custom format of date time field

if i have a datetime field (in a SQL table), and I want to extract and format the date time as following, what is my syntax for doing so:

If date time is 10/19/2007 5:00:00 PM  and I want to get a string such as
"last updated on 19-Oct-2007 at 5:00 PM"
1 Solution
Patrick MatthewsCommented:
SELECT "Last updated " & Format(timestamp, "d-mmm-yyyy") & " at " & Format(timestamp, "h:mm AM/PM") AS Updated
FROM YourTable
sf_garrisonAuthor Commented:
Excellent .. Thanks for the quick reply

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now