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. SharePoint
  4. DateTimeControl date format

DateTimeControl date format

Scheduled Pinned Locked Moved SharePoint
helpquestion
2 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.
  • L Offline
    L Offline
    Lodeclaw
    wrote on last edited by
    #1

    I'm trying to set the format of my DateTimeControls to yyyy/mm/dd but the only method I can find is through the localeid property. The only locales that use yyyy/mm/dd as their primary format are non-english, so they don't help me much. The government standard in Canada (where I am) is yyyy/mm/dd but as a nation all three primary formats are used. Is there any way to select which format I want to use, or am I stuck with Microsoft's default, dd/mm/yyyy? Thanks ahead of time for any assistance!

    M 1 Reply Last reply
    0
    • L Lodeclaw

      I'm trying to set the format of my DateTimeControls to yyyy/mm/dd but the only method I can find is through the localeid property. The only locales that use yyyy/mm/dd as their primary format are non-english, so they don't help me much. The government standard in Canada (where I am) is yyyy/mm/dd but as a nation all three primary formats are used. Is there any way to select which format I want to use, or am I stuck with Microsoft's default, dd/mm/yyyy? Thanks ahead of time for any assistance!

      M Offline
      M Offline
      Michael J Eber
      wrote on last edited by
      #2

      Well...first of all the date format is driven by the locale set in the installed version of Windows. This is a LOCALE default NOT a Microsoft default. That said you need to look at how the locale is set either on your machine or on your machine AND your servers. Locale defines your formatting for money, dates, etc. Now if you MUST display the date in that format the first question is if that format is included in the Canadian locale definition? At the Region and Language settings within Windows 7, I'm allowed to set Short Date format to yyyy-mm-dd and I expect that the operating system level is where you will get that set for your code.

      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