Page 1 of 1

Day Name of the Week From Date

Posted: Tue May 19, 2009 11:14 pm
by ds2000
I want to get DAYNAME from the Integer Date Type:

e.g.
Input: 20090520
Output: Wed

This is a px job, advance thanx for any help.

Posted: Tue May 19, 2009 11:51 pm
by sourabhverma
Try to use WeekdayFromDate function in the transformation stage.

Posted: Wed May 20, 2009 7:21 am
by ds2000
Thanks sourabhverma,

From documentation "WeekdayFromDate" Returns the day number (int8) of the week from the given date.

Is this day number mean 1=Mon 2=Tue 3=Wed ........ ?

Am i right ?

Posted: Wed May 20, 2009 9:21 am
by chulett
Sunday is "day zero" of the week unless you override that with the OriginDate option, so yes as long as you know Sunday is 0 and not 7. Now, I think this can change under NLS... or can be changed by LOCALE... not sure. :?

Posted: Wed May 20, 2009 5:00 pm
by ds2000
Thanks Chullet.
WeekdayFromDate(link.datecolumn) gives Integer from 0-6. Used if conditions to get values for Sun-Sat.