Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. How do I select time only from a DATETIME column?

How do I select time only from a DATETIME column?

Scheduled Pinned Locked Moved Visual Basic
questioncsharpasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Praveen 123
    wrote on last edited by
    #1

    sir, I am developing an application in ASP.NET using VB.NET.My backend tool is MS-Access.How can i select time only from a date time feild... Actually i want 09:00:15 AM/PM only...But its displaying 12/12/1987 09:00:15 AM/PM ...

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    M 1 Reply Last reply
    0
    • P Praveen 123

      sir, I am developing an application in ASP.NET using VB.NET.My backend tool is MS-Access.How can i select time only from a date time feild... Actually i want 09:00:15 AM/PM only...But its displaying 12/12/1987 09:00:15 AM/PM ...

      Praveen.K System Engineer Graviton Technologies Pvt.Ltd

      M Offline
      M Offline
      M Hall
      wrote on last edited by
      #2

      use the format command i.e Format(yourdata, "h:mm:ss")

      J 1 Reply Last reply
      0
      • M M Hall

        use the format command i.e Format(yourdata, "h:mm:ss")

        J Offline
        J Offline
        Johan Hakkesteegt
        wrote on last edited by
        #3

        Although VB6's Format still works nicely, you're better off using .net's built in properties, because you can never be sure about the settings of client PCs and servers, etc: Depending on what exactly you need you can use: YourDate.ToLongTimeString or YourDate.ToShortTimeString Johan

        My advice is free, and you may get what you paid for.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups