Datetime value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hema gaikwad
    New Member
    • Sep 2007
    • 1

    #1

    Datetime value

    I want to initialize time value to "00:00:00" how can I do it in vb.net.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by hema gaikwad
    I want to initialize time value to "00:00:00" how can I do it in vb.net.
    You should have posted your question in the .NET Forum section, not in the
    .NET Articles section. I'll move your question for you.

    kind regards,

    Jos

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Well there really isn't a "just time" object.
      There is the DateTime object and the TimeSpan object.
      You could create a DateTime object and then just ignore the date part if you wanted?

      Comment

      • chazcross
        New Member
        • Feb 2007
        • 31

        #4
        If you use a datetime object and only pass in the date DateTime.Today etc
        to any object that uses a datetime object, the time will be set to 12:00:00 AM. This includes SQL Server.

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          When I want to make a "null" time value for databases I use:
          DateTime.MinVal ue.
          It's man many years in the past and I can key off of it if I need to.

          Comment

          Working...