Oracl cmd for dayname
jullien88
Messages postés
2
Statut
Membre
-
krakixx Messages postés 3404 Date d'inscription Statut Membre Dernière intervention -
krakixx Messages postés 3404 Date d'inscription Statut Membre Dernière intervention -
Hi,
my table contains a colun "datetime" (16/02/2013 , ....)
i would like to extract the dayname (saturday, ...)
can one of you help me .
thx.
my table contains a colun "datetime" (16/02/2013 , ....)
i would like to extract the dayname (saturday, ...)
can one of you help me .
thx.
1 réponse
-
to_char(to_date(03/09/1982,'dd/mm/yyyy'), 'DAY')
I think it should work
for first three characters
select to_char(to_date('03/09/1982','dd/mm/yyyy'), 'DY')
for only first letter capital
select to_char(to_date('03/09/1982','dd/mm/yyyy'), 'Dy')
-
Hi
Thx for your answer. The pb is resolved but i can't get what i want from my table.
I want to get all the values of my table where datetime (one of my column ) is like 'sunday'.
select * FROM my_table WHERE to_char(to_date(trunc(datetime),'dd/mm/yyyy'), 'DAY') like 'sunday'
is there any solution ? -
-