Good morning everybody. I have a problem and I'm sure someone can help me because this forum is the maximum. Do I need a function or another routine that tells me if an informed date is or not working day ???
valeu Galera: -The: -O
Function for days
- dr_gori
- Moderador
- Posts: 5024
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Take a look at this link: http://en.glufke.net/oracle/viewtopic.php?t=22
You can use to_char to find out the day of the week. (1 = Sunday, 7 = Saturday).
See example:
You can use to_char to find out the day of the week. (1 = Sunday, 7 = Saturday).
See example:
SQL> select to_char(sysdate, 'd') from dual;
T
-
2
SQL>
SQL> select case when to_char(sysdate, 'd') in (1,7) then 'FIM DE SEMANA'
2 else 'DIA UTIL'
3 end
4 from dual;
CASEWHENTO_CH
-------------
DIA UTIL
SQL>
SQL> select case when to_char(sysdate+5, 'd') in (1,7) then 'FIM DE SEMANA'
2 else 'DIA UTIL'
3 end
4 from dual;
CASEWHENTO_CH
-------------
FIM DE SEMANA
SQL>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 16 guests