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
This commit is contained in:
Bruce Momjian 2023-12-26 15:31:50 -05:00
parent bbf1f13408
commit f67a3d4268
1 changed files with 6 additions and 0 deletions

View File

@ -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>