Skip to main content

Vertica Documention missing ISO DAYOFWEEK format option ('ID')

  • August 21, 2015
  • 2 replies
  • 17 views

Emanuel_Pordes_1
Forum|alt.badge.img+1

Hi,

 

Even though it works, the 'ID' option for date formatting to display the ISO DAYOFWEEK (Sunday = 7, Monday = 1) isn't documented even though other ISO options are (DAYOFYEAR, WEEKOFYEAR, etc)

 

It looks like a simple omission from the docs.

 

https://my.vertica.com/docs/7.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Functions/Formatting/TemplatePatternsForDateTimeFormatting.htm

 

 

vertica=> SELECT DAYOFWEEK('2015-08-23 10:00:00'::timestamp) AS "day_of_week";
 day_of_week
-------------
 1
(1 row)


vertica=> SELECT TO_CHAR('2015-08-23 10:00:00'::timestamp, 'ID') AS "day_of_week";
 day_of_week
-------------
 7
(1 row)

2 replies

Thakur
Forum|alt.badge.img
  • Participating Frequently
  • August 21, 2015

Emanuel_Pordes_1
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • August 21, 2015

Yes, the function is documented but the TO_CHAR timstamp format option is not.