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
  1. Home
  2. General Programming
  3. C#
  4. Customized DateTime Picker Control

Customized DateTime Picker Control

Scheduled Pinned Locked Moved C#
databasehelpquestion
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.
  • V Offline
    V Offline
    Varun Sareen
    wrote on last edited by
    #1

    Dear Friends, I need to add a customized DateTime picker control onto my webpage. As in my database table; the data is being stored in the following format:- "yyyy-mm-dd hh:mm:ss.mmm" so the user needs to select the date and time in the following format only in order to get the correct data from the database. But I am not able to make such control. Could anyone help me out, how should i proceed with making this control?

    H L 2 Replies Last reply
    0
    • V Varun Sareen

      Dear Friends, I need to add a customized DateTime picker control onto my webpage. As in my database table; the data is being stored in the following format:- "yyyy-mm-dd hh:mm:ss.mmm" so the user needs to select the date and time in the following format only in order to get the correct data from the database. But I am not able to make such control. Could anyone help me out, how should i proceed with making this control?

      H Offline
      H Offline
      Hiren solanki
      wrote on last edited by
      #2

      As far as I understand your question, You don't need to make such a custom control to display value in format you want. there's inbuilt property in DateTime Picker control of Custom format you can set custom format as you want accordingly. See this MSDN[^] Article for more detail.

      Regards, Hiren. Microsoft Dynamics CRM "A SQL query goes into a bar, walks up to two tables and asks, "Can I join you?", "yes naturally""

      1 Reply Last reply
      0
      • V Varun Sareen

        Dear Friends, I need to add a customized DateTime picker control onto my webpage. As in my database table; the data is being stored in the following format:- "yyyy-mm-dd hh:mm:ss.mmm" so the user needs to select the date and time in the following format only in order to get the correct data from the database. But I am not able to make such control. Could anyone help me out, how should i proceed with making this control?

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        You should never store a date, a time or a datetime as a string if there are alternatives. Most databases do have some kind of date or datetime field type, so use it. A database cares about storing data, not formatting it; your app must deal with formatting data when presented to the user. This[^] little article may tell you more about datetime type. :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, and update CP Vanity to V2.0 if you haven't already.

        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