Re: [PHP] Working with Dates

2004-12-02 Thread Richard Lynch
Robert Sossomon wrote: > I have this code below that needs to display stuff depending on WHEN it > is. I > am pretty sure it is something simple I have confused (again) but can't > place my > finger on it. Anyone see the mistake? > > > $today = date("m-d-y"); > $early = date("m-d-y",mktime(0, 0,

[PHP] Working with Dates

2004-12-02 Thread Robert Sossomon
I have this code below that needs to display stuff depending on WHEN it is. I am pretty sure it is something simple I have confused (again) but can't place my finger on it. Anyone see the mistake? $today = date("m-d-y"); $early = date("m-d-y",mktime(0, 0, 0, 1, 14, 2005)); $normal = date("m-d

Re: [PHP] Working with dates

2003-03-17 Thread Jim Lucas
you do that same query in mysql Jim - Original Message - From: "Joshua Moore-Oliva" <[EMAIL PROTECTED]> To: "Brad Harriger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 17, 2003 10:49 AM Subject: Re: [PHP] Working with dates

Re: [PHP] Working with dates

2003-03-17 Thread Joshua Moore-Oliva
Switch to postgres! then you can do SELECT stamp FROM table WHERE stamp BETWEEN timestamp 'today' AND timestamp 'tomorrow'; On March 17, 2003 12:43 pm, Brad Harriger wrote: > I have two variables, $StartDate and &EndDate that contain values read > from MySQL Date fields. How can I determine i

RE: [PHP] Working with dates

2003-03-17 Thread John W. Holmes
> I have two variables, $StartDate and &EndDate that contain values read > from MySQL Date fields. How can I determine if a value entered by the > user is between the two dates? I'm using PHP 4.0.6. I think you can take MySQL timestamps directly into strtotime(). If($user > strtotime($StartDate

Re: [PHP] Working with dates

2003-03-17 Thread Erik Price
Brad Harriger wrote: I have two variables, $StartDate and &EndDate that contain values read from MySQL Date fields. How can I determine if a value entered by the user is between the two dates? I'm using PHP 4.0.6. if ($user_input > $StartDate && $user_input < $EndDate) { // do som

[PHP] Working with dates

2003-03-17 Thread Brad Harriger
I have two variables, $StartDate and &EndDate that contain values read from MySQL Date fields. How can I determine if a value entered by the user is between the two dates? I'm using PHP 4.0.6. Thanks in advance, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

RE: [PHP] Working with dates in PHP

2002-10-10 Thread David Freeman
> I am at my wits end at the moment. I am pulling a > datetimestamp out of a database and attempting to > get the year month and day out of it. Do it in your sql query. Check out chapter 6 of the MySQL manual for ways to manipulate dates. Eg. $query = "select DATE_FORMAT(DTStamp, '%e %b

Re: [PHP] Working with dates in PHP

2002-10-10 Thread Tom Rogers
Hi, Friday, October 11, 2002, 3:53:55 PM, you wrote: JP> I am at my wits end at the moment. I am pulling a datetimestamp out of a JP> database and attempting to get the year month and day out of it. However JP> I am stumped as how to do it. JP> The format is "-MM-DD HH:MM:SS" and its com

[PHP] Working with dates in PHP

2002-10-10 Thread James Purser
I am at my wits end at the moment. I am pulling a datetimestamp out of a database and attempting to get the year month and day out of it. However I am stumped as how to do it. The format is "-MM-DD HH:MM:SS" and its coming out of a mySQL database. Is there anyway I can get the informatio