Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Function - Weekday Starts on Saturday

Status
Not open for further replies.

qberta01

Programmer
Nov 14, 2005
113
Can anyone tell me how I would express this SQL code into cognos code?

Dateadd(day, 1-datepart(dw,DATEADD(day, 1,posdate)),DATEADD(day, 1,posdate)) as IssueWeek


thx,

Q.
 
You need to use the _day_of_week() Cognos function to handle the T-SQL expression of datepart(dw,[somedate])

date_add is then replaced by the Cognos _add_days() function.

Example:

Code:
dateadd(day,1,posdate)

will become:

Code:
_add_days(1,[posdate])

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top