Using the sortable date/time pattern that conforms to ISO 8601 should give
you the best results.
It is the equivalent of yyyy-MM-ddTHH:mm:ss and can be used by specifying
the output as DateTime.ToString("s"). For this format the seprators are not
affected by the culture.
If the value needs to be timezone sensitive then even better results can be
achieved by converting the value to UTC prior to writing it and converting
the UTC value to local when reading it.
When reading the value use DateTime.ParseExact(<value>, "s", Nothing).
"Tim Marsden" <tm***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,
What is the best way to store a date as text. I want to be able to read
the date from the external source (config file etc) and be able to
interpret it regardless of the local culture setting. The date may be
stored using on culture and read using another.
Thanks
Tim