Forum OpenACS Q&A: Response to formatting timestamps

Collapse
Posted by Ola Hansson on
Jonathan, If you want to remove the padding from, let's say, month and hour it can be done with the "FM" prefix:
<br><br>
spi_exec "select to_char(''$1''::timestamp, ''<b>FM</b>Month DD YYYY <b>FM</b>HH:MI AM TZ'') as s"
<br><br>
This works in PG 7.1.3 and beyond. (Maybe before that too)...