Oracl cmd for dayname

jullien88 Messages postés 2 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.
A voir également:

1 réponse

krakixx Messages postés 3404 Date d'inscription   Statut Membre Dernière intervention   718
 
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')
1
jullien88 Messages postés 2 Date d'inscription   Statut Membre Dernière intervention  
 
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 ?
0
krakixx Messages postés 3404 Date d'inscription   Statut Membre Dernière intervention   718
 
I would not answer my knowledge on Oracle are limited. And I think no one gives you the solution because it is a forum (French) so it does not speak English . I hope you have help.
0