Re: Selecting date in given format
Posted in 1999
As I know in 7.3 it is almost the same format. You should use: to_char(date_field, '%Y-%m-%d') Of course there are much more format options for to_char functions. Hope it helps, Octav On Wed, Mar 10, 1999 at 02:09:11PM +0000, Honza Pazdziora wrote: > Hello, > > I'm searching for a way to select a date field in some nice format. > What is the equivalent of Oracle's > > select to_char(date_field, 'yyyy-mm-dd') from table > > that forces the output string have format 1999-03-10, instead of the > default 99-03-10. I want to stay in pure SQL for this task. > > Any hint would be apprecited, > > -- > ------------------------------------------------------------------------ > Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/ > make vmlinux.exe -- SGI Visual Workstation Howto > ------------------------------------------------------------------------ -- Octav Chiriac Phone: (373) 2 21 20 96 NetInfo S.R.L. Fax: (373) 2 21 36 59 Chisinau (373) 2 24 00 83 Moldova, Republic of mailto:com@netinfo-moldova.com