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

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Not sure why this script is not working?
Hi I am new to php programing and I was trying to make up a simple script like a captcha but I canno

Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error

[error]
Pars

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

help with php
It's not displaying or pulling anything out of the database.


Code: <html><

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

PHP error (line 38) my website
Hello everyone, I'm new on this
and I got a web site thats got a error not showing the photos on<

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