doc: add ISO 8601 extended format example using to_char()

Reported-by: juha.mustonen@iki.fi

Discussion: https://postgr.es/m/20170217160154.6101.52806@wrigleys.postgresql.org

Co-authored-by: Erik Wienhold

Backpatch-through: master
pull/151/head
Bruce Momjian 2 years ago
parent bbf1f13408
commit f67a3d4268
  1. 6
      doc/src/sgml/func.sgml

@ -8748,6 +8748,12 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
<entry><literal>to_char(current_timestamp, 'FMDay,&nbsp;FMDD&nbsp;&nbsp;HH12:MI:SS')</literal></entry>
<entry><literal>'Tuesday,&nbsp;6&nbsp;&nbsp;05:39:18'</literal></entry>
</row>
<row>
<entry><literal>to_char(current_timestamp AT TIME ZONE
'UTC', 'YYYY-MM-DD"T"HH24:MI:SS"Z"')</literal></entry>
<entry><literal>'2022-12-06T05:39:18Z'</literal>,
<acronym>ISO</acronym> 8601 extended format</entry>
</row>
<row>
<entry><literal>to_char(-0.1, '99.99')</literal></entry>
<entry><literal>'&nbsp;&nbsp;-.10'</literal></entry>

Loading…
Cancel
Save