Advertisement
thioshp

Formats For Displaying Time & Date

Jun 30th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. String Time Placeholders
  2. %a - The abbreviated weekday name (Sun)
  3. %A - The full weekday name (Sunday)
  4. %b - The abbreviated month name (Jan)
  5. %B - The full month name (January)
  6. %d - Day of the month (01..31)
  7. %e - Day of the month (1..31)
  8. %H - Hour of the day, 24-hour clock (00..23)
  9. %I - Hour of the day, 12-hour clock (01..12)
  10. %l - Hour of the day ()
  11. %j - Day of the year (001..366)
  12. %m - Month of the year (01..12)
  13. %M - Minute of the hour (00..59)
  14. %p - Meridian indicator (AM or PM)
  15. %S - Second of the minute (00..60)
  16. %w - Day of the week (Sunday is 0, 0..6)
  17. %y - Year without a century (00..99)
  18. %Y - Year with century
  19. %Z - Time zone name
  20. %% - Literal % character
  21.  
  22. EXAMPLES:
  23. %A, %b %d == Thursday, Jun 30
  24. %m/%d/%Y == 06/30/2016 18:42PM
  25. %m-%e-%y %H:%M == 06/30/2016 18:42PM
  26. %a, %e %b %Y %H:%M:%S %z == 06/30/2016 18:42PM
  27. %d.%m.%y == 06/30/2016 18:42PM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement