Re: mapping date value (SQL question) - Mailing list pgsql-general

From Jeff Self
Subject Re: mapping date value (SQL question)
Date
Msg-id 1014302316.15734.5.camel@personnel_test
Whole thread Raw
In response to Re: mapping date value (SQL question)  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
On Thu, 2002-02-21 at 09:31, Johnson, Shaunn wrote:
> --that's close.  but i need the '0' in the field between the
> year and the quarter.
>
> --all of this because a company want's fixed length columns.
>
> --i was reading about something like this:
>
> [example]
>
> select to_char(to_date('05/21/1998'),'Q') from dual
>
> [/example]
>
> --trying to modify it somehow ...
>
> --thanks!
>
> -X

Are you talking about showing the quarter as 01 or 02 instead of 1 or 2?
If so, just convert the quarter to a character using casting I suppose
and insert the 0 in front of it. What are you using to provide the
reports? It would probably be a lot easier to let those tools do the
work for you. Perl or PHP could easily make the quarter look like 01 or
02.

--
Jeff Self
Information Technology Analyst
Department of Personnel
City of Newport News
2400 Washington Ave.
Newport News, VA 23607
757-926-6930


pgsql-general by date:

Previous
From: "Mancz, James"
Date:
Subject: Re: mapping date value (SQL question)
Next
From: Thomas Lockhart
Date:
Subject: Re: mapping date value (SQL question)