Re: Is it possible for PostgreSQL to support mmddyyyy date format?
От | Justin |
---|---|
Тема | Re: Is it possible for PostgreSQL to support mmddyyyy date format? |
Дата | |
Msg-id | 49DD5642.2040907@emproshunts.com обсуждение исходный текст |
Ответ на | Is it possible for PostgreSQL to support mmddyyyy date format? (Bernard Barton <bfb21@comcast.net>) |
Список | pgsql-general |
<font size="+1"><font face="Arial">This is from the link <br /></font></font><table border="1" class="CALSTABLE"><tbody><tr><td>1/8/1999</td><td>January8 in <tt class="LITERAL">MDY</tt> mode; August 1 in <tt class="LITERAL">DMY</tt>mode</td></tr><tr><td>1/18/1999</td><td>January 18 in <tt class="LITERAL">MDY</tt> mode; rejectedin other modes</td></tr><tr><td>01/02/03</td><td>January 2, 2003 in <tt class="LITERAL">MDY</tt> mode; February 1,2003 in <tt class="LITERAL">DMY</tt> mode; February 3, 2001 in <tt class="LITERAL">YMD</tt> mode</td></tr></tbody></table><br/> <font size="+1"><font face="Arial">you can run this <br /><br /> select '01/01/2009'::date,'01-01-2009'::date<br /><br /> You can change the output for the client..<br /><br /><a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DATESTYLE">http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DATESTYLE</a><br /></font></font><br/> Bernard Barton wrote:. <br /><blockquote cite="mid:49DD2E52.7040303@comcast.net" type="cite"><pre wrap="">I'mcurrently porting an Informix based application to PostgreSQL 8.3. All of the dates processed by the application are in the mmddyyyy format. According to the date input table at the link below, the mmddyyyy format is not listed. The yyyymmdd format is supported, but I'd have to modify a LOT of code to change the format, which I'm trying to avoid. Is there any way to get PG to work with the mmddyyyy date format? I know I can use the to_date function, but again, it would be MUCH simpler if PG worked with this format. -Thanks <a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-DATE-TABLE">http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-DATE-TABLE</a> </pre></blockquote>
В списке pgsql-general по дате отправления: