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. Date formate changing in Italian settings

Date formate changing in Italian settings

Scheduled Pinned Locked Moved C#
helpdatabasequestion
4 Posts 4 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.
  • A Offline
    A Offline
    attalurisubbu
    wrote on last edited by
    #1

    Hi all, I am facing problem in displaying the Date formate in Excel . From Database i am displaying the Date lets say the Formate "dd/mm/yy" e.g 03/05/10. nothing but (3rd May 2010) The above formate is displaying in correctly in English settings but when the client generating the excel, there it is displaying as "05/03/10" i mean day and month are interchanging. (Because they are using Italian settings due to this reason date is displaying like 05/03/10) Can any body help on this?Date formate should not interchange Thanks in advance, Balu.

    N D T 3 Replies Last reply
    0
    • A attalurisubbu

      Hi all, I am facing problem in displaying the Date formate in Excel . From Database i am displaying the Date lets say the Formate "dd/mm/yy" e.g 03/05/10. nothing but (3rd May 2010) The above formate is displaying in correctly in English settings but when the client generating the excel, there it is displaying as "05/03/10" i mean day and month are interchanging. (Because they are using Italian settings due to this reason date is displaying like 05/03/10) Can any body help on this?Date formate should not interchange Thanks in advance, Balu.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Perhaps this will help, http://msdn.microsoft.com/en-us/library/ht77y576(v=VS.100).aspx[^]


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • A attalurisubbu

        Hi all, I am facing problem in displaying the Date formate in Excel . From Database i am displaying the Date lets say the Formate "dd/mm/yy" e.g 03/05/10. nothing but (3rd May 2010) The above formate is displaying in correctly in English settings but when the client generating the excel, there it is displaying as "05/03/10" i mean day and month are interchanging. (Because they are using Italian settings due to this reason date is displaying like 05/03/10) Can any body help on this?Date formate should not interchange Thanks in advance, Balu.

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        You can make use of InvariantCulture[^] property.

        1 Reply Last reply
        0
        • A attalurisubbu

          Hi all, I am facing problem in displaying the Date formate in Excel . From Database i am displaying the Date lets say the Formate "dd/mm/yy" e.g 03/05/10. nothing but (3rd May 2010) The above formate is displaying in correctly in English settings but when the client generating the excel, there it is displaying as "05/03/10" i mean day and month are interchanging. (Because they are using Italian settings due to this reason date is displaying like 05/03/10) Can any body help on this?Date formate should not interchange Thanks in advance, Balu.

          T Offline
          T Offline
          The Man from U N C L E
          wrote on last edited by
          #4

          I would leave it as is. They have Italian settings for a reason (are they Italian perhaps) so they will want dates to show in the Italian format. The only time I think it is legitimate to force a date format is with regard to American settings when coding for British users. Unfortunately Microsoft in their wisdom default English settings to be American English, even on editions of software produced specifically for the British market. Consequently many British people have American settings by mistake. This is especially a problem with SQL Server, which will not install in British English no matter how hard you try (causing no end of trouble with reporting services), and must be changed afterwards. In fact only the execution language can be changed, the root installed language settings cannot be changed! All other culture settings should be respected.

          If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

          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