Parameters (Timestamp, String);
Returns: String;
Outputs a string representing a date/time value formatted to a given pattern.
The first parameter is the date/time to be formatted.
The second parameter is the format pattern.
The examples below show the characters that can be used in the pattern.
Example 1: DATEFORMAT('2015-07-15 12:10:05','dd/MM/yyyy') = 15/7/2015
Example 2: DATEFORMAT('2015-07-15 17:10:05','HH:mm:ss') = '17:10:05'
Example 3: DATEFORMAT('2015-07-15 13:10:05','hh:mm a') = '17:10:05'
Example 4: DATEFORMAT('2015-07-15 13:10:05','MMM d, yyyy h:mm a zz') = 'Jul 7, 2015 1:10:05 PM EST'
Comments
0 comments
Please sign in to leave a comment.