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.
Did you know?Explore Trending and Topic pages for more stories like this.

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

C problem struct and string
Hi guys,

This is my first post and I'm hoping the experts here can help me solve my problem.<

include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

Quick fix: Conditional statement with an array
Hi, I'm getting the temperature value off of the Environment Canada website along with the icon file

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

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