Thursday, January 20, 2005

Working with SQL Server Date/Time Variables: Part Two - Displaying Dates and Times in Different Formats

http://www.databasejournal.com/features/mssql/article.php/2197931


Working with SQL Server Date/Time Variables: Part Two - Displaying Dates and Times in Different Formats: "PRINT '1) HERE IS MON DD YYYY HH:MIAM (OR PM) FORMAT ==>' +
CONVERT(CHAR(19),GETDATE())
PRINT '2) HERE IS MM-DD-YY FORMAT ==>' +
CONVERT(CHAR(8),GETDATE(),10)
PRINT '3) HERE IS MM-DD-YYYY FORMAT ==>' +
CONVERT(CHAR(10),GETDATE(),110)
PRINT '4) HERE IS DD MON YYYY FORMAT ==>' +
CONVERT(CHAR(11),GETDATE(),106)
PRINT '5) HERE IS DD MON YY FORMAT ==>' +
CONVERT(CHAR(9),GETDATE(),6)
PRINT '6) HERE IS DD MON YYYY HH:MM:SS:MMM(24H) FORMAT ==>' +
CONVERT(CHAR(24),GETDATE(),113)

Here is the output from the above script:
1) HERE IS MON DD YYYY HH:MIAM (OR PM) FORMAT ==>Feb 5 2003 5:54AM
2) HERE IS MM-DD-YY FORMAT ==>02-05-03
3) HERE IS MM-DD-YYYY FORMAT ==>02-05-2003
4) HERE IS DD MON YYYY FORMAT ==>05 Feb 2003
5) HERE IS DD MON YY FORMAT ==>05 Feb 03
6) HERE IS DD MON YYYY HH:MM:SS:MMM(24H) FORMAT ==>05 Feb 2003 05:54:39:567"

Searching date, time data in SQL Server 2000 :

Searching date, time data in SQL Server 2000 : Narayana Vyas Kondreddi's home page

Wednesday, January 19, 2005

Sql Reporting services "report item expressions can only refer"

When you get the message "report item expressions can only refer ...", make sure the variables you are referrering to are the right CASE.

The case must match the output case from the sql output. Even in VB!!!

MSSQL Server 2000 Reporting Services: Black Belt Components: Ad Hoc Conditional Formatting for OLAP Reports

MSSQL Server 2000 Reporting Services: Black Belt Components: Ad Hoc Conditional Formatting for OLAP Reports