Showing posts with label everyonei. Show all posts
Showing posts with label everyonei. Show all posts

Wednesday, March 21, 2012

Datetime parameter problems

Hi everyone

I have been reading another thread about this subject, but didn't get much useful info from it.

I have a datetime parameter on my report that is set to today() by default.

I use the User!Language to ensure that dates are formatted correctly (my end-users are Danish, Spanish, English)

Everything works fine on the preview tab, but when I access the deployed report through a link to the report server on a HTML-page the formatting of the date becomes US-style. This leads to further problems, as the report can not be processed because another format is expected (probably due to the User!Language settings on the report - in my case Danish).

I need to find a solution, that does not remove the dynamics of being able to run in different language settings (I saw in the other thread that one solution could be to hard code a statement with a specific language setting - that is not an option for me).

Hope someone can help

Maybe I should add that the problem occurs the first time I try to change the date to another date than the default date by using the calendar icon. Then the date is changed to US-format...|||Your regional settings must be US on the PC with IE.
Put the User!Language in a textbox to see what it thinks your settings are.

how to change the settings:
http://www.endnote.com/support/helpdocs/Changing%20Regional%20Settings%20in%20Windows%20XP.pdf
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/int_pr_date.mspx?mfr=true

Can someone from MSFT post a pinned message showing how to resolve date format issues?

This one seems to come up at least once a day|||

My settings are not US - but Danish: da-DK

If I view the report once with the default date (that is formatted correct) - I have no problems - but if I try to change the date to another date e.g. yesterday - then the format is changed from 19-06-07 (DK) to 06/19/2007 (US) and I immediately get an error saying:

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

    I have the exact same problem.

    It appears it has been introduced with SP2.

    no matter what regional setting you use it always reverts the selection to en-US, and then generates an error.

    The error must be generated by some internal validation on the DatePicker.

    If anyone finds a fix please let me know

    |||This is a problem with that control, it cannot use anything except US date format. The simple work around when using other cultures is to run the report instead of using the Preview tab, the web version of that control does not suffer from that problem.|||That is not correct - I only get the error when I run the report in a browser!!!|||

    Sorry, i didn't read what you said properly. In your case, make sure your browser language settings are set correctly (IE defaults to en-US), and the regional settings on the report server and in the report itself are set correctly.

    BTW, the en-US format of the date picker control in the preview tab *was* an issue until just recently, it has come to my notice the MS have released some hotfixes to SP2 that address the issue: http://support.microsoft.com/kb/936305

  • Wednesday, March 7, 2012

    Datetime

    Hi Everyone:
    I have a datetime column (col7) where the output is in the format mm/yyyy.
    When I execute the following sql statement, I do get the result set as 8/200
    5
    or 10/2004. In all double-digit month numbers I do get the right output.
    However, in case of single-digit month numbers I need the output as 08/2005
    and not simply 8/2005. I would appreciate if someone can help me in this
    direction.
    ****************************************
    select (cast((datepart(month ,col7))as varchar(3))+'/'+ cast((datepart(year,
    col7))as varchar(4)))as col7
    FROM tablea
    ***************************
    Thanks
    Sujoy Paulright( '0' + cast( datepart(month, col7) as varchar(2)) , 2 )
    "sujoyp" <sujoyp@.discussions.microsoft.com> wrote in message
    news:3A4AAB69-8FE4-4F88-8BFF-30BD1C386CED@.microsoft.com...
    > Hi Everyone:
    > I have a datetime column (col7) where the output is in the format mm/yyyy.
    > When I execute the following sql statement, I do get the result set as
    8/2005
    > or 10/2004. In all double-digit month numbers I do get the right output.
    > However, in case of single-digit month numbers I need the output as
    08/2005
    > and not simply 8/2005. I would appreciate if someone can help me in this
    > direction.
    > ****************************************
    > select (cast((datepart(month ,col7))as varchar(3))+'/'+
    cast((datepart(year,
    > col7))as varchar(4)))as col7
    > FROM tablea
    > ***************************
    > Thanks
    > Sujoy Paul
    >|||research "case". if your month is less than 10 then you'll have just 1
    diget.

    > Hi Everyone:
    > I have a datetime column (col7) where the output is in the format mm/yyyy.
    > When I execute the following sql statement, I do get the result set as
    > 8/2005 or 10/2004. In all double-digit month numbers I do get the right
    > output. However, in case of single-digit month numbers I need the output
    > as 08/2005 and not simply 8/2005. I would appreciate if someone can help
    > me in this direction.
    > ****************************************
    > select (cast((datepart(month ,col7))as varchar(3))+'/'+
    > cast((datepart(year, col7))as varchar(4)))as col7
    > FROM tablea
    > ***************************
    > Thanks
    > Sujoy Paul
    new|||Thanks. It worked.
    Sujoy
    "Rebecca York" wrote:

    > right( '0' + cast( datepart(month, col7) as varchar(2)) , 2 )
    >
    > "sujoyp" <sujoyp@.discussions.microsoft.com> wrote in message
    > news:3A4AAB69-8FE4-4F88-8BFF-30BD1C386CED@.microsoft.com...
    > 8/2005
    > 08/2005
    > cast((datepart(year,
    >
    >|||here's the year part too.
    select right(convert(varchar(10), getdate(), 103), 7)
    > right( '0' + cast( datepart(month, col7) as varchar(2)) , 2 )
    >
    > "sujoyp" <sujoyp@.discussions.microsoft.com> wrote in message
    > news:3A4AAB69-8FE4-4F88-8BFF-30BD1C386CED@.microsoft.com...
    > 8/2005
    > 08/2005
    > cast((datepart(year,
    new