how should i handle date time.

  • Dear all

    i have a two servers, one is for asp.net app and other is for sqlserve

    1)how should i treat datetime in strored procedure and in c# code please note i do not want to take risk(some body may change the format of date in windows or other places( except sqlserver))

    2) Please sugggest me for windows app which works on singel desktop where app and sqlserver both are on same machine and

    database can be on other machine also.

    yours sincerelly,

  • rajemessage (5/26/2012)


    1)how should i treat datetime in strored procedure and in c# code please note i do not want to take risk(some body may change the format of date in windows or other places( except sqlserver))

    Don't understand the question. How do you treat datetime when doing what?

    2) Please sugggest me for windows app which works on singel desktop where app and sqlserver both are on same machine and

    database can be on other machine also.

    What are you asking here?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • if some one changes date format of windows OS/system formte will it affect the code of sqlserver/ c#.

  • Make sure that you always write string literals in a format that can't be misunderstood - yyyy-mm-dd, then there will be no problems.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply