Date/Time Problem with SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • enginoren
    New Member
    • Feb 2010
    • 6

    Date/Time Problem with SQL

    Hi there,

    I have a web app that works with SQL 2008 in ASP, vbscript code. A very simple thing; i have Projects page. There i have the Project Name, Company, and the Finish Date. I simply enter the value 22/11/2010 for example. When i hit the Save button, it works fine, i see in the SQL studio that the data is corretly saved. But when i enter 10/11/2010 for example, it swithces the day and month numbers as long as i hit the save button, as if it can not recognize which one is the month, which one is the day.
    10/11/2010
    11/10/2010
    10/11/2010
    ...
    ...
    This continues as long as i click the save/update button. It also changes in the SQL data itself.

    how can i solve that problem?

    Thanks in advance...
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    It has something to do with the server date format setting. Here, read this.

    Good Luck!!!

    ~~ CK

    Comment

    • enginoren
      New Member
      • Feb 2010
      • 6

      #3
      well thanks for the reply, seems to be a solution for me...will try tomorrow at work.

      thanx

      Comment

      • kabilahan
        New Member
        • May 2007
        • 14

        #4
        hi..

        convert the date and store it...

        example

        just run this
        select convert(varchar (10),getdate(), 106)

        output
        10 Feb 201

        Comment

        • enginoren
          New Member
          • Feb 2010
          • 6

          #5
          Thanks for the trick kabilahan! i used it in my View, worked awesome ;)

          thanks for the replies..

          Comment

          Working...