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

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

PHP Code reffering to database, doing something wrong.. pls help
Well i am quite new with PHP
and for school we have to make a PHP script which reffers to a Data

Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values

I think i'm using the syntax incorrectly
Hi Everyone!

I'm new to this forum and a newbie with PHP - I'm glad I found this site - I hop

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

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