Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php date

date("d"); //Day of month: 09
date("j"); //Day of month without 0: 9
date("jS"): //Day of month with "th": 21th
date("D"): //Day of week abbreviated: Thu
date("l"): //Day of week: Thursday
date("z"); //Day of the year: 110
date("t"); //Number of days in given month: 30
date("m"); //Month number: 04
date("n"); //Month number without 0: 4
date("M"); //Month name abbreviated: Apr
date("F"); //Month name: April
date("Y"); //Year: 2022
date("y"); //Last 2 digits of year: 22
date("o"); //ISO Year number: 2022
date("h"); //Hour (12 fomrat): 02
date("H"); //Hour (24 fomrat): 14
date("g"); //Hour without 0 (12 fomrat): 2
date("G"); //Hour without 0 (24 fomrat): 14
date("i"); //Minutes: 29
date("s"); //Seconds: 24
date("u"); //Microseconds: 33
date("a"); //am or pm
date("A"); //AM or PM
date("e"); //Timezone identifier: UTC
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #date
ADD COMMENT
Topic
Name
8+4 =