DATE MONTH YEAR TIME FUNCTIONS IN PHP - PHP LESSON 7 STUDENTSBLOG100

In this tutorial date and time functions of php are discussed. Lets check out most common php date functions that mu be known to a php developer.

date("y")
Returns the current year from system date

date("m")
Returns the current month from system date (For January it displays 1)

date("n")
Returns the current month from a date without leading zeroes ( eg. "1" instead of "01") - with today's date (For January it displays 01)

date("F")
Returns the current month name from a date

date("d")
Returns the current day of the month from a date

date("l")
Returns the name of the current weekday from a date.

date("w")
Returns the current day of the week from a date.

date("H")
Returns the current hour from a system time

date("i")
Returns the current minute from a system time

date("s")
Returns the current second from a system time

Exapmple:
Output:
23:10:14
10-23-14
Thursday
October
2014

Lesson 6 Previous | Main Page | Next Lesson 8

Previous
Next Post »