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. Web Development
  3. ASP.NET
  4. how to conver year to dateTime format

how to conver year to dateTime format

Scheduled Pinned Locked Moved ASP.NET
3 Posts 2 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.
  • R Offline
    R Offline
    ramyasangeet
    wrote on last edited by
    #1

    hi all, In my page,I have to enter only year(eg 1999) in the textbox.but it should be inserted as datetime format in DB. how to convert year to datetime format in c#. Eg: 1999 to 1/1/1999 12:00:00 AM Plz give ur suggestions thanks in advance

    cheers sangeet

    S 1 Reply Last reply
    0
    • R ramyasangeet

      hi all, In my page,I have to enter only year(eg 1999) in the textbox.but it should be inserted as datetime format in DB. how to convert year to datetime format in c#. Eg: 1999 to 1/1/1999 12:00:00 AM Plz give ur suggestions thanks in advance

      cheers sangeet

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      For Every year the date and time is same ?

      Thanks and Regards Sandeep If you want something you never had, do something you have never done!

      R 1 Reply Last reply
      0
      • S Sandeep Akhare

        For Every year the date and time is same ?

        Thanks and Regards Sandeep If you want something you never had, do something you have never done!

        R Offline
        R Offline
        ramyasangeet
        wrote on last edited by
        #3

        Yes..all the year with same date and time. I got it by just adding Convert.ToDateTime(@"1/1/" + Year_Tbox.Text) thanks for ur reply..

        cheers sangeet

        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