- Retrieve the original timestamp Date column from database on php page,‘2013-10-10 01:25:39’‘YYYY-MM-DD HH:MM:SS’.
- Use PHP date();
- date([1st parameter is date string format],[2nd parameter is the variable]);
- date(‘dS F Y’, $row[login_date]);
- PHP DATE STRING FORMAT
d
= day
S
= English date Suffix
F
= Full name of Month
Y
= 4-digits numeric year
date('dS
M Y', strtotime($row['login_date']));
Output: 10th
Oct 2013
SOURCE
LINK: PHP Date()
SOURCE
LINK: PHP strtotime()
No comments:
Post a Comment