Re: How to compare dates?

From: "Victor Yegorov" <viy(at)pirmabanka(dot)lv>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to compare dates?
Date: 2003-03-17 08:45:20
Message-ID: 20030317084520.GH7181@pirmabanka.lv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

* Abdul Wahab Dahalan <wahab(at)mimos(dot)my> [17.03.2003 10:36]:
> How do I compare this dates:
>
> 1. date( in timestamp) = 2003-03-16 11:29:23.567417+08
>
> 2. date created from java program like :
>
> String format ="dd.MM.yyyy";
> Date today = new Date();
> SimpleDateFormat formatter = new SimpleDateFormat(format);
> String todaysdate = formatter.format(today);
>
> says the result is : todaysday = 17.03.2003
>
> Any help very much appriciated
> Thanks.

use to_date and to_char functions, refer to para 6.7 of PostgreSQL User's
Guide.

--

Victor Yegorov

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2003-03-17 08:58:04 Re: How to compare dates?
Previous Message Abdul Wahab Dahalan 2003-03-17 08:29:54 How to compare dates?