doc: add ISO 8601 extended format example using to_char()
authorBruce Momjian
Tue, 26 Dec 2023 20:31:50 +0000 (15:31 -0500)
committerBruce Momjian
Tue, 26 Dec 2023 20:31:50 +0000 (15:31 -0500)
Reported-by: [email protected]
Discussion: https://postgr.es/m/20170217160154[email protected]

Co-authored-by: Erik Wienhold
Backpatch-through: master

doc/src/sgml/func.sgml

index 20da3ed0334886b7f1abba86d74b00c692af669f..cec21e42c05b139d36e220f1ed2bb883c7c99cb8 100644 (file)
@@ -8748,6 +8748,12 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
         to_char(current_timestamp, 'FMDay, FMDD  HH12:MI:SS')
         'Tuesday, 6  05:39:18'
        
+       
+        to_char(current_timestamp AT TIME ZONE
+        'UTC', 'YYYY-MM-DD"T"HH24:MI:SS"Z"')
+        '2022-12-06T05:39:18Z',
+        ISO 8601 extended format
+       
        
         to_char(-0.1, '99.99')
         '  -.10'