Oracl cmd for dayname

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.

1 réponse

  1. 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
    1. 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
    2. 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