pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Yegorov <viy@pirmabanka.lv>
To: pgsql-sql@postgresql.org
Subject: Re: How to compare dates?
Date: Mon, 17 Mar 2003 10:45:20 +0200
Message-ID: <20030317084520.GH7181@pirmabanka.lv> (raw)
In-Reply-To: <3E758782.9913878A@mimos.my>
References: <3E758782.9913878A@mimos.my>

* Abdul Wahab Dahalan <wahab@mimos.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

view thread (4+ messages)  latest in thread

Message-ID: <20030317084520.GH7181@pirmabanka.lv>
Permalink:  ../20030317084520.GH7181@pirmabanka.lv/
Also on:    postgresql.org/message-id/20030317084520.GH7181@pirmabanka.lv

 · 

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: viy@pirmabanka.lv
  Subject: Re: How to compare dates?
  In-Reply-To: <20030317084520.GH7181@pirmabanka.lv>

* 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