Solved

php relative date

Posted on 2014-10-24
2
167 Views
Last Modified: 2014-10-25
Hi experts
I need a function that return  relative date... Today, yesterday, this week, this month... Month of xxxx.  I need yesterday like in real life starting a midnight and not 24hours ago.

Thanks for your help
0
Comment
Question by:abouerez
2 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 500 total points
ID: 40403572
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 40404051
This article tells how to use date/time values in PHP.
http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html

See Practical Application #3a, and please post back if you still have any questions about what works with strtotime().
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now