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

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

How to pass parameter to tag query?
Hi,
I want to get the value of a tag at a specific time (like 10/27/09 15:29:59), I need to giv

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

need help with php get
i have a option box that gets filled with dates, but how do i get once the option value has been cli

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

Problem Dereferencing
With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,

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