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,
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
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
> 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
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
> 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
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
7 matches
Mail list logo