1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

save date and time separately in sql 2005 using c#.net

Discussion in 'C#' started by dreskei, Oct 29, 2010.

  1. dreskei

    dreskei New Member

    Joined:
    Oct 22, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Location:
    delhi
    i have to insert date and time separately into the record using c#.net.....i tried a lot...but it gives an error "object reference not set to an instance of an object"

    please help me out
     
  2. dotNet Zombie

    dotNet Zombie New Member

    Joined:
    Aug 28, 2010
    Messages:
    34
    Likes Received:
    10
    Trophy Points:
    0
    Occupation:
    .Net Developers
    Location:
    Minnesota
    Home Page:
    What does your Data Schema look like.

    Explain a little more what you mean by seperating the date and time. Are you doing something like this?

    Code:
      
    string[] arrayDate = DateTime.Now.Date.ToString().Split(' ');
    string date = arrayDate[0];
    string time = arrayDate[1];
    
     

Share This Page