Showing posts with label solution. Show all posts
Showing posts with label solution. 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

  • Monday, March 19, 2012

    DateTime Issue

    I don't like store time in smalldatetime field owing to application limitation, Is there any solution, let me help matter is most urgent and my application is too big.
    Thanking You
    R.MallWhat is the application limitation?? do u need to run queries aganist this column??|||What is the application limitation?? do u need to run queries aganist this column??

    In totality it is big application already developped in PowerBuilder 7.3 and fullfill the need of business. That was with sybase, rightnow I am looking to port this data into MSSQL Server and application also tested on the MSSQL Server 2000, It is working as per need apart from date issue. Sybase doesn't need to store time with date, So I am looking similar datatype which doesn't need to store timestamp in date columns.

    Is the any way to resolve this issue at database level.

    Thanks

    R.Mall|||Hi,

    SQL Server do not support Time data type as such...So to store a time only data u will have to store the integer portion of datetime datatype as 0 ...(i.e January 1, 1900)...

    But then if ur application does not allow u to use datetime datatype...may be try with CHAR......|||How I can store only integer part in datetime colmns.

    Thanks|||How I can store only integer part in datetime colmns.make sure when you save a datetime value that you do not provide a time value as well

    so INSERT ... VALUES ... ( '2004-10-27' ... ) is okay, and the time portion of the value is set to 00:00:00

    however, INSERT ... VALUES ... ( getdate() ... ) includes a time

    if you want to strip the time, use

    ... cast(convert(char(10),getdate(),120) as datetime)

    Sunday, February 19, 2012

    DateFormat Problem

    Hi,

    I've gone through various posts related to this topic but did not find the solution.

    I have a smalldatetime field in SQLServer and I want to retrieve the value in "dd/mm/yyyy" format.

    Below is the code for my formula field:

    [Code Start]

    IF {ListOfProjectsDeveloperWise.Fld_Invoice_Status} = "No" then

    "Not Raised"

    else

    Left ({ListOfProjectsDeveloperWise.Fld_Invoice_name}, 3) & "-" & Date({ListOfProjectsDeveloperWise.Fld_Invoice_Date})

    [Code End]

    Fld_Invoice_Date is smalldatetime and i want to retrieve it in dd/mm/yyyy format. It is stored in mm/dd/yyyy format. I have tried various methods like datepart() etc but none yields suitable result.

    Regards,

    VinayHi

    plz try this format

    Date (YYYY, MM, DD)
    Returns a Date value given numeric arguments of the year, month, and day.

    Example :

    The following examples are applicable to Crystal syntax:

    Date ("Dec 31, 2005")
    Returns the Date value for Dec. 31, 2005.

    Date (#Oct. 20, 2005 12:02pm#)
    Returns the Date value for October 20, 2005.

    Date (2005, 7, 30)
    Returns the Date value for July 30, 2005.|||No, it doesn't solve the problem.

    regards,

    Vinay|||Right click on the field and select format field Now you can choose the format you want

    Tuesday, February 14, 2012

    Date/Time formatting

    Hi all, I'm hoping this is an easy solution . . .
    How can I format the system date: getdate() as mm/dd/yyyy hh:mi am?
    Am I missing something? I am fairly new to sql server . . .
    I would use datepart, but I cannot find a way to display the time like
    I have shown.
    Your help is appreciated.
    Thank you and have a great night,
    Ryan<ryan.mclean@.gmail.com> wrote in message
    news:1130715275.732555.138960@.g43g2000cwa.googlegroups.com...
    > Hi all, I'm hoping this is an easy solution . . .
    > How can I format the system date: getdate() as mm/dd/yyyy hh:mi am?
    > Am I missing something? I am fairly new to sql server . . .
    > I would use datepart, but I cannot find a way to display the time like
    > I have shown.
    > Your help is appreciated.
    > Thank you and have a great night,
    > Ryan
    >
    The way your dates and times are displayed is controlled by your client
    application, not by SQL Server. Format the value client-side.
    If you must control the format from the server then you'll have to return a
    string instead of a DATETIME. Take a look at the CONVERT function in Books
    Online. CONVERT allows you to convert DATETIME to a string in any one of
    various formats.
    David Portas
    SQL Server MVP
    --|||<ryan.mclean@.gmail.com> wrote in message
    news:1130715275.732555.138960@.g43g2000cwa.googlegroups.com...
    > Hi all, I'm hoping this is an easy solution . . .
    > How can I format the system date: getdate() as mm/dd/yyyy hh:mi am?
    > Am I missing something? I am fairly new to sql server . . .
    > I would use datepart, but I cannot find a way to display the time like
    > I have shown.
    > Your help is appreciated.
    > Thank you and have a great night,
    > Ryan
    >
    The way your dates and times are displayed is controlled by your client
    application, not by SQL Server. Format the value client-side.
    If you must control the format from the server then you'll have to return a
    string instead of a DATETIME. Take a look at the CONVERT function in Books
    Online. CONVERT allows you to convert DATETIME to a string in any one of
    various formats.
    David Portas
    SQL Server MVP
    --|||Hi David,
    First, thanks for posting a reply . . .
    I am displaying the data in an asp.net datagrid, so it is actually more
    efficient if I format the data on the database server in my sql
    statement.
    I have looked at the convert function, and I don't see where I can
    format the data how I have specified. In ocacle, I would use to_date
    and it would be done.
    Thanks for trying, but I need a little more guidance then suggesting a
    function.
    Ryan|||I'm surprised that you think it's more efficient to do formatting in
    the database than in ADO. Usually formatting is done client side
    precisely to avoid putting that overhead on the database. ADO provides
    date formatting through the ToString method for that purpose.
    Aside from efficiency, doing it at the client has the advantage of
    being user-configurable. Apparently you want to force all your users to
    conform to your preference on how they should view dates. Also, if you
    return a formatted string in the form you suggested then the user won't
    be able to sort on it.
    To do it in the database would look something like this:
    SELECT CONVERT(CHAR(10),CURRENT_TIMESTAMP,101)+
    '
    '+RIGHT(CONVERT(VARCHAR,CURRENT_TIMESTAM
    P,0),8)
    David Portas
    SQL Server MVP
    --|||>> I have looked at the convert function, and I don't see where I can format
    SELECT CONVERT( VARCHAR, GETDATE(), 101 ) +
    RIGHT( CONVERT( VARCHAR, GETDATE(), 100 ), 8 )
    Anith|||Hi again,
    David, that is a good point and it would probably be more applicable if
    it were a distributed app (it's just an admin tool that we will use).
    I just don't see the advantage of pulling back a data set, then looping
    through every record and messing with each item individually when I can
    have the database engine do all the work, then I just have to display
    it.
    Anyway, always a learning process. I really appreciate your posts.
    Also, a thank you to Anith.
    Thanks and have a great day,
    Ryan