I mostly write Crystal reports, sometimes using SQL to collect the data. But now I need to fix an existing report that does most of its logic in SQL and just uses Crystal to display the result.
A problem occurs when the first of a month is also a Sunday. I know how to test for this in Crystal: DatePart with "w" would be 1 for that date.
Looking in SQL, I find that DatePart does not include this option, though it can identify weekdays. I also see logic to select a Sunday or find the next Sunday. But not a simple way to test if an existing date is Sunday or not.
Can anyone help, please?
Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP
A problem occurs when the first of a month is also a Sunday. I know how to test for this in Crystal: DatePart with "w" would be 1 for that date.
Looking in SQL, I find that DatePart does not include this option, though it can identify weekdays. I also see logic to select a Sunday or find the next Sunday. But not a simple way to test if an existing date is Sunday or not.
Can anyone help, please?
Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP