ns_fmttime returns the specified date and time in a formatted string. This function behaves the same as the strftime function in C.
The time argument must specify the date and time as the number of seconds since 00:00:00 UTC, January 1, 1970. You can use the ns_time function to get the current time in this format.
You can use the following elements in the formatstring argument to specify how the returned string will be formatted. The default formatstring is "%a %b %d %T %Y".
Format Element, Description
same as %
locale's abbreviated weekday name
locale's full weekday name
locale's abbreviated month name
locale's full month name
locale's appropriate date and time representation
locale's century number (the year divided by 100 and truncated)
day of month ( 01 - 31 )
date as %m/%d/%y
day of month (1-31; single digits are preceded by a blank)
locale's abbreviated month name
hour ( 00 - 23 )
hour ( 01 - 12 )
day number of year ( 001 - 366 )
month number ( 01 - 12 )
minute ( 00 - 59 )
same as new-line
locale's equivalent of either AM or PM
time as %I:%M:%S [AM|PM]
time as %H:%M
seconds ( 00 - 61 ), allows for leap seconds
same as a tab
time as %H:%M:%S
week number of year ( 00 - 53 ), Sunday is the first day of week1
weekday number ( 0 - 6 ), Sunday = 0
week number of year ( 00 - 53 ), Monday is the first day of week 1
locale's appropriate date representation
locale's appropriate time representation
year within century ( 00 - 99 )
year as ccyy ( e.g. 1986)
time zone name or no characters if no time zone exists