Problem in date update

Discussion in 'C#' started by nivas_kumar, Apr 10, 2008.

  1. #1
    I have updated date "2/2/2008".When i see the update result it displays 12:00:11AM how i update "2/2/2008"?
     
    nivas_kumar, Apr 10, 2008 IP
  2. InfoSmith

    InfoSmith Peon

    Messages:
    884
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    date = '2008-2-2'
     
    InfoSmith, Apr 13, 2008 IP
  3. Sleeping Troll

    Sleeping Troll Peon

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not sure about what you are asking, but I think this might help.
    The date and time are represented by a number which represents the number of seconds since Midnight Jan 1 1900. You will find date and time functions much easier to deal with if you keep this in mind, what you see in a date field is a formatted variable.
    E me if you want,
     
    Sleeping Troll, Apr 13, 2008 IP
  4. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    If you're using an MS Access database (Naughty naughty!), the delimiter will be # rather than '. Try it anyway.
     
    dylanj, Apr 20, 2008 IP
  5. salman4raza

    salman4raza Peon

    Messages:
    373
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    try entering like 2/feb/2008 or change sequence if you dont have mask, or set field property to date.
     
    salman4raza, Apr 24, 2008 IP
  6. ASPMachine

    ASPMachine Peon

    Messages:
    723
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Are you using FrontPage? This problem is occurred when you update database using FrontPage build in ASP Script. If you select timestamp update from "Additional Fields" option, ASP script will automatically add the time along with the date. You need to call the ASP update function from script page. Use the code Date() to update only Date.
     
    ASPMachine, Apr 26, 2008 IP