Re: comparing dates - Mailing list pgsql-php

From Christopher Kings-Lynne
Subject Re: comparing dates
Date
Msg-id GNELIHDDFBOCMGBFGEFOKEPOCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to comparing dates  (Joseph Syjuco <joseph@asti.dost.gov.ph>)
List pgsql-php
Use mktime to convert them both to unix timestamps and then compare them as
integers, or compare them in the database directly.

Chris


> -----Original Message-----
> From: pgsql-php-owner@postgresql.org
> [mailto:pgsql-php-owner@postgresql.org]On Behalf Of Joseph Syjuco
> Sent: Saturday, 6 July 2002 4:33 AM
> To: PHP-PGSQL
> Subject: [PHP] comparing dates
>
>
> how do i compare the current date to a date field in my database
> e.g.
> $current_date = date('Y=m-d');
> $dbdate = pg_result($rsdate,0,"exam_date");
> if ($current_date>$dbdate) --THIS PART DOESNT WORK
>     echo "Today is not your exam date";
> TIA
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>




pgsql-php by date:

Previous
From: Joseph Syjuco
Date:
Subject: comparing dates
Next
From: Keary Suska
Date:
Subject: Re: comparing dates