From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | Abdul Wahab Dahalan <wahab(at)mimos(dot)my> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: How to compare dates? |
Date: | 2003-03-17 14:41:44 |
Message-ID: | Pine.LNX.4.44.0303171237070.4852-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 17 Mar 2003, Abdul Wahab Dahalan wrote:
> 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
If you need to compare pgsql timestamp (unix time + micros)
with java.util.Date (unix time), then
you only need the compare() method.
Note that java.sql.Timestamp extends java.util.Date.
>
> Any help very much appriciated
> Thanks.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-210-8981112
fax: +30-210-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2003-03-17 14:54:03 | Re: Formatting intervals.. |
Previous Message | Tomasz Myrta | 2003-03-17 14:32:26 | Re: Formatting intervals.. |