10

I want to retrieve day of the week from the given date.

For example the date is: 2015-01-28 then it has to return Wednesday

My bad try:

select date_part('week',now()) as weekday;

The above script gives me only number of week but not the day of the week.

Ermiya Eskandary
  • 15,323
  • 3
  • 31
  • 44
MAK
  • 6,824
  • 25
  • 74
  • 131

1 Answers1

13

Try to_char():

select to_char(now(), 'Day')
Andomar
  • 232,371
  • 49
  • 380
  • 404