Solved

php relative date

Posted on 2014-10-24
2
169 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 109

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
write screen output to text file 21 47
maybe no no httpd.conf 6 47
send post values 7 26
What does this formatting equate to? 7 11
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

777 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