Solved

php relative date

Posted on 2014-10-24
2
164 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
Comment Utility
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 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

9 Experts available now in Live!

Get 1:1 Help Now