SAP Knowledge Base Article - Preview

2221708 - CALWEEKOFYEAR() gives different results in SAP IQ and SQL Anywhere

Symptom

In IQ, date function returns unexpected values.

Example. Week number CALWEEKOFYEAR (Abbreviation cwk) for date '2014/12/29'.

In IQ :

select datepart(cwk,'2014/12/29') from iq_dummy ;
datepart(cwk,'2014/12/29')
--------------------------
                        53

 That '2014/12/29' is day of last week of year 2014.

 

In SQL Anywhere :

 select datepart(cwk,'2014/12/29')
datepart(cwk,'2014/12/29')
--------------------------
                         1

 

The date '2014/12/29' is a day of First week of 2015.

How this difference can be explained?


Read more...

Environment

SAP IQ 15.4

Product

SAP Sybase IQ 15.4

Keywords

KBA , BC-SYB-IQ , Sybase IQ , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.