Showing posts with label provide. Show all posts
Showing posts with label provide. Show all posts

Thursday, March 22, 2012

DateTimePicker RS2005SP2 solution?

I read a lot of posts in this forum, but none of them provide a solution.

Probably it is related to SP2 as many report, I have SP2 as well...

A funny situation:
I have a report parameter @.date, datatype datetime, so I can use the datepicker control.

But, even when not using this @.date parameter in my dataset, I still get the error:

  • The value provided for the report parameter 'date' is not valid for its type. (rsReportParameterTypeMismatch)

    Of course it has to do with regional settings and languages etc... But at my international client's site, workstations are in any regional setting and servers are in en-US, nothing I can do about that.

    Come'on Microsoft, don't tell us this datePicker is only for the US market?

    Thank You MS!

    Apparently it is now solved in the Cumulative update package 2 for SQL Server 2005 Service Pack 2

    See http://support.microsoft.com/kb/936305, bug n_ 50001284

  • DateTime with TimeZone ?

    Are there any plans to enhance the DateTime datatype to be able to store a timezone, and provide timezone aware arithmetic functions ?

    The lack of timezone support seems a glaring omission - especially given that Microsoft's biggest DB competitor (Oracle) has a timestamp with timezone datatype. At present, you have to code all this yourself in SQL 2005. Is this not something that should be built into the DBMS ?

    Thanks,

    Andy Mackie

    You can store it as UTC.

    HTH, Jens Suessmeyer.

    Friday, February 17, 2012

    DateDiff function

    I can't get that function working in my SQL report. Can someone provide a sample code, please?

    ThanksIn the cell expression type:

    =DateDiff("d", "8/26/2005", "12/31/2005")

    You can also put a function in the report code (Layout View | Properties | Code tab). And reference the code in the cell as:

    =Code.CustomDateDiff("d", Now(), "12/31/2005")

    Where CustomDateDiff is :

    Function CustomDateDiff(Interval, Date1, Date2)

    CustomDateDiff = DateDiff(Interval, Date1, Date2) & " Days left in the year."

    End Function