Re: date_part, how to use

From: "Joel Burton" <joel(at)joelburton(dot)com>
To: <juerg(dot)rietmann(at)pup(dot)ch>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: date_part, how to use
Date: 2002-05-14 12:27:12
Message-ID: JGEPJNMCKODMDHGOBKDNCEBHCOAA.joel@joelburton.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Will

SELECT CAST( tpl_start_timestamp AS date )

work?

Sigh. CFML is so ugly. Anyway, hope this helps.

Joel BURTON | joel(at)joelburton(dot)com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant

> -----Original Message-----
> From: pgsql-sql-owner(at)postgresql(dot)org
> [mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of
> juerg(dot)rietmann(at)pup(dot)ch
> Sent: Tuesday, May 14, 2002 5:29 AM
> To: pgsql-sql(at)postgresql(dot)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
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Mathieu Arnold 2002-05-14 12:28:57 Re: order by <something wierd>
Previous Message Frank Morton 2002-05-14 12:23:53 sort text field numerically