1 Reply Latest reply on Jul 21, 2010 9:39 AM by user96848

    first day of the week

      How can we change in a session the first day

      of week? For example I want Saturday to be the first day of week so I can

      use it in TO_CHAR or TO_DATE with the 'WW' option.
        • 1. Re: first day of the week
          There is a standard date format model whihc will give the number for the day of the week, but this is based on Monday being 1 through to Sunday being 7.
          I think you would need to write something specific to give you what you want.

          A decode will work but is probably not the prettiest solution:
          decode(to_char(sysdate, 'DY'), 'MON', 7, 'TUE', 1, 'WED',2, 'THU', 3, 'FRI', 4, 'SAT', 5, 'SUN', 6) DAY_NUM from dual;