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. datetime [modified]

datetime [modified]

Scheduled Pinned Locked Moved C#
question
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.
  • D Offline
    D Offline
    debnathrubs
    wrote on last edited by
    #1

    how i will change windows date time format? It should change the system's date time format too. -- modified at 5:39 Wednesday 14th February, 2007

    D 2 Replies Last reply
    0
    • D debnathrubs

      how i will change windows date time format? It should change the system's date time format too. -- modified at 5:39 Wednesday 14th February, 2007

      D Offline
      D Offline
      dipswitch ownage4u nl
      wrote on last edited by
      #2

      Format Info DateTime objDate = DateTime.Now; String strFormatedDate = objDate.ToString("yyyy-mm-dd HH:mm:ss"); Edit: Wrong topic? OS/SysAdmin Anyway you can change the windows date time format in Start->Configuration Screen->Languagesettings There you can change all currency and formats... -- modified at 5:41 Wednesday 14th February, 2007

      1 Reply Last reply
      0
      • D debnathrubs

        how i will change windows date time format? It should change the system's date time format too. -- modified at 5:39 Wednesday 14th February, 2007

        D Offline
        D Offline
        dipswitch ownage4u nl
        wrote on last edited by
        #3

        Check the registry key in regedit: HKEY_CURRENT_USER\Control Panel\International Here are all the windows format settings stored. To edit this value's from within your program you have to use the Microsoft.Win32.Registry class. PS. When you want to edit/update an value you need to use the method CreateSubKey and not OpenSubKey This code will change the long date time representation of windows to DayName DayOfWeek MonthName 4-digit Year: RegistryKey objReg = Registry.CurrentUser.CreateSubKey(@"\Control Panel\International"); objReg.SetValue("sLongDate", "dddd d MMMM yyyy"); Hope this is usefull...

        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