0

I have been searching on the net on how to get and store the current date in yyyymmdd format. There are many code out there but it formats the dos %date%:%time% output to required specs.

The problem with that is, I need it to work universally across all regional settings. I can't find the code example to do that.

Can anyone help? If this is not possible, then is there a way to change the regional setting temporarily write the file and change it back to what it was?

Shafik Yaghmour
  • 154,301
  • 39
  • 440
  • 740
csaw
  • 172
  • 11
  • 6
    Dating is a particularly difficult topic for your stereotypical developer ;) – LostBoy Dec 12 '13 at 09:02
  • It is not a dup q. And the previous question has no relation to what I am asking. I guess dating is a problem here ;) – csaw Dec 12 '13 at 09:11
  • Please take a look at [this question](https://stackoverflow.com/questions/10289017/how-to-format-date-and-time-string-in-c) and its accepted answer. The title says C++, but the answer uses a C library. I think it might help you – nestedloop Dec 12 '13 at 09:14

0 Answers0