Re: How to compare dates?

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Cc: wahab(at)mimos(dot)my
Subject: Re: How to compare dates?
Date: 2003-03-17 08:58:04
Message-ID: 3E758E1C.CA2B945C@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> 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
>
select to_char(timestamp '2003-03-16 11:29:23.567417+08','DD.MM.YYYY');
to_char
------------
16.03.2003
(1 row)

if that is what you wanted to know.

Regards, Christoph

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-03-17 09:16:10 Re: String aggregate function
Previous Message Victor Yegorov 2003-03-17 08:45:20 Re: How to compare dates?