View Thread
 Print Thread
[GUIDE] PHP-Fusion Change Date/Time Format
NetriX
The PHP-Fusion admin panel limits time displays with the drop-down menu. There are so many different variables to place to change the way your date/time looks.

Below is a list, if you need help just ask.

[big]Day[/big]
  • %a weekday, abbreviated Thu
  • %A weekday, full Thursday
  • %d day of the month (dd), zero padded 10
  • %e day of the month (dd) 10
  • %j day of year, zero padded 001-366
  • %u day of week starting with Monday (1), i.e. mtwtfss 4
  • %w day of week starting with Sunday (0), i.e. smtwtfs 4

[big]Week[/big]
  • %U week number Sunday as first day of week 01?53
  • %W week number Monday as first day of week 01?53
  • %V week of the year 01?53

[big]Month[/big]
  • %m mm month 03
  • %h Mon Mar
  • %b Mon, locale's abbreviated Mar
  • %B locale's full month, variable length March

[big]Year[/big]
  • %y yy two digit year 00?99
  • %Y ccyy year 2011
  • %g 2-digit year corresponding to the %V week number
  • %G 4-digit year corresponding to the %V week number

[big]Century[/big]
  • %C cc century 00?99

[big]Date[/big]
  • %D mm/dd/yy 03/10/11
  • %x locale's date representation (mm/dd/yy) 03/10/2011
  • %F %Y-%m-%d 2011-03-10

[big]Hours[/big]
  • %l (Lowercase L) hour (12 hour clock) 1
  • %I (Uppercase I) hour (12 hour clock) zero padded 01
  • %k hour (24 hour clock) 13
  • %H hour (24 hour clock) zero padded 13
  • %p locale's upper case AM or PM (blank in many locales) PM
  • %P locale's lower case am or pm pm

[big]Minutes[/big]
  • %M MM minutes 26

[big]Seconds[/big]
  • %s seconds since 00:00:00 1970-01-01 UTC (Unix epoch) 1299763592
  • %S SS second 00?60
  • (The 60 is necessary to accommodate a leap second)
  • %N nanoseconds 000000000?999999999

[big]Time[/big]
  • %r hours, minutes, seconds (12-hour clock) 01:26:32 PM
  • %R hours, minutes (24 hour clock) hh:mm e.g. 13:26
  • %T hours, minutes, seconds (24-hour clock) 13:26:32
  • %X locale's time representation (%H:%M:%S)

Need help? Having trouble?
» View our Documentation for guides, functions and more - including the [url=https://php-fusion.co.uk/articles.php?cat_
 
https://netrixhosting.com
Jump to Forum
Similar Threads
Thread Forum Replies Last Post
PHP-Fusion 9 Development [7.02.XX] General Development 11 05-27-2019 04:35
Is it inevitably time to move to something else? General Chat 10 08-05-2018 05:42
Fusion 9.0 Theme with Nebula Themes Support 2 06-14-2018 03:38
PHP-Fusion Designs Graphics Talk 4 01-28-2018 07:38
No PHP-Fusion System General Chat 2 01-13-2018 07:46