pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Joel Burton <joel@joelburton.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: juerg.rietmann@pup.ch
To: pgsql-sql@postgresql.org
Subject: Re: date_part, how to use
Date: Tue, 14 May 2002 23:23:57 -0400
Message-ID: <JGEPJNMCKODMDHGOBKDNEEEOCOAA.joel@joelburton.com> (raw )
In-Reply-To: <GNELIHDDFBOCMGBFGEFOKEJMCCAA.chriskl@familyhealth.com.au >
I'll bite. Why better?
Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant
> -----Original Message-----
> From: Christopher Kings-Lynne [mailto:chriskl@familyhealth.com.au]
> Sent: Tuesday, May 14, 2002 10:08 PM
> To: Joel Burton; juerg.rietmann@pup.ch; pgsql-sql@postgresql.org
> Subject: RE: [SQL] date_part, how to use
>
>
> SELECT EXTRACT (DATE FROM tpl_start_timestamp) is better
>
> Chris
>
> > -----Original Message-----
> > From: pgsql-sql-owner@postgresql.org
> > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Joel Burton
> > Sent: Tuesday, 14 May 2002 8:27 PM
> > To: juerg.rietmann@pup.ch; pgsql-sql@postgresql.org
> > Subject: Re: [SQL] date_part, how to use
> >
> >
> > Will
> >
> > SELECT CAST( tpl_start_timestamp AS date )
> >
> > work?
> >
> > Sigh. CFML is so ugly. Anyway, hope this helps.
> >
> >
> > Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
> > Knowledge Management & Technology Consultant
> >
> > > -----Original Message-----
> > > From: pgsql-sql-owner@postgresql.org
> > > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of
> > > juerg.rietmann@pup.ch
> > > Sent: Tuesday, May 14, 2002 5:29 AM
> > > To: pgsql-sql@postgresql.org
> > > Subject: [SQL] date_part, how to use
> > >
> > >
> > > Hello there
> > >
> > > How can I extract the date part from a timestamp ? Thanks for
> any help !
> > >
> > > select * from transport_log
> > > where
> > > tpl_status != '0' and
> > > tpl_zylinder LIKE <cfif '#session.filter_zid#' EQ ''> '%' <cfelse> '
> > > #session.filter_zid#%' </cfif> and
> > > datepart('dd.mm.yyyy',tpl_start_timestamp) > <cfif '
> > > #session.filter_FromDate#' EQ ''> '01.01.1900' <cfelse> '
> > > #session.filter_FromDate#' </cfif>
> > > order by tpl_transport
> > >
> > >
> > > Regards ... jr
> > >
> > > __________________________________________________
> > >
> > > PFISTER + PARTNER, SYSTEM - ENGINEERING AG
> > > Juerg Rietmann
> > > Grundstrasse 22a
> > > 6343 Rotkreuz
> > > Switzerland
> > >
> > > internet : www.pup.ch
> > > phone : +4141 790 4040
> > > fax : +4141 790 2545
> > > mobile : +4179 211 0315
> > > __________________________________________________
> > >
> > >
> > >
> > > ---------------------------(end of
> broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
> > >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
view thread (5+ messages) latest in thread
Message-ID: <JGEPJNMCKODMDHGOBKDNEEEOCOAA.joel@joelburton.com>
Permalink: ../JGEPJNMCKODMDHGOBKDNEEEOCOAA.joel@joelburton.com/
Also on: postgresql.org/message-id/JGEPJNMCKODMDHGOBKDNEEEOCOAA.joel@joelburton.com
copy link · copy postgr.es
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: joel@joelburton.com, chriskl@familyhealth.com.au, juerg.rietmann@pup.ch
Subject: Re: date_part, how to use
In-Reply-To: <JGEPJNMCKODMDHGOBKDNEEEOCOAA.joel@joelburton.com>
* 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