pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-sql@postgresql.org
Cc: wahab@mimos.my
Subject: Re: How to compare dates?
Date: Mon, 17 Mar 2003 09:58:04 +0100
Message-ID: <3E758E1C.CA2B945C@rodos.fzk.de> (raw)

>
> 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





view thread (4+ messages)  latest in thread

Message-ID: <3E758E1C.CA2B945C@rodos.fzk.de>
Permalink:  ../3E758E1C.CA2B945C@rodos.fzk.de/
Also on:    postgresql.org/message-id/3E758E1C.CA2B945C@rodos.fzk.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ch@rodos.fzk.de, wahab@mimos.my
  Subject: Re: How to compare dates?
  In-Reply-To: <3E758E1C.CA2B945C@rodos.fzk.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox