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

Printing a webpage
I use this to print the webpage: o

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

How a counter of users ? such as ---> (231 Viewing)
I want to count how many users are actually viewing the page, How is that possible?
Thank you guy

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

php mysql script to find record
Hi,

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

line breaks in between fetched file names
Hi,

I have this code:
Code: <?php
if($dir = opendir('files')){
while (($f

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

Hit counter updating once per IP - IP HIT COUNTER
I have a hit counter, for the amount of views on a tutorial.
It'll do the query and then do..

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