Last Weeks sDate and eDate.


Posted on 16th Feb 2014 07:03 pm by admin

sDate - Start Date
eDate - End Date

I need to pull two dates for "Last Week" which goes from Sunday to Saturday.

So today... Last week would be 10/11/09 as sDate and 10/17/09 as eDate.

This...
Code: [Select]<?php
echo date('m-d-Y', strtotime("last sunday")-7);
echo " - ";
echo date('m-d-Y', strtotime("last saturday"));
?>
Prints out 10-17-2009 - 10-17-2009 for some reason the -7 just doesnt work.

How can i get the result i want?

Thanks!

No comments posted yet

Your Answer:

Login to answer
302 Like 30 Dislike
Previous forums Next forums
Other forums

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

Points for Wiki contribution
Hi everyone,

I want to know how long does it take for the moderator to award points for a

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

need help about
i store the value of my select statement result to an array and stored it to a variable named $fname

convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash