Re: format date retrieved from database
От | Michael Fork |
---|---|
Тема | Re: format date retrieved from database |
Дата | |
Msg-id | Pine.BSI.4.21.0103231538020.21785-100000@glass.toledolink.com обсуждение исходный текст |
Ответ на | format date retrieved from database (Naomi Fullam <fullam@student.cs.ucc.ie>) |
Список | pgsql-php |
You want to take a look at the to_char function described here: http://www.postgresql.org/devel-corner/docs/user/functions-formatting.html in your case it would be: SELECT to_char(myDateField, 'DD-MM-YYYY') Michael Fork - CCNA - MCP - A+ Network Support - Toledo Internet Access - Toledo Ohio On Fri, 23 Mar 2001, Naomi Fullam wrote: > Hi > I found this function for mysql > > SELECT DATE_FORMAT(myDateField, '%d-%m-%Y') FROM myTable > > The DATE_FORMAT function allows one to format myDateField as I see fit, > I want to have it in date-month-year format. myDateField is of type > date. > > Basically I was just wondering if there is a similar Postgres command? > > Thanks in advance! > > Naomi > ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
В списке pgsql-php по дате отправления: