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

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

Amend code to allow multiple attachments
Hi

I have a php page that allows the user to browse to a file (image) then sumbit, the confi

MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blan

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.


for ($i=0; $i<10

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

Php navigation
I have four buttons on a php page.
If i click a button it will redirect to different php pages.

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