Heck, I don't know if this works in all circumstances so please let me know if you use this and are or are not happy with it.
string RegionalFormat = (new DateTime(2008, 2, 29)).ToString().Split("/".ToCharArray())[0] == "29" ? "d/M/yyyy" : "M/d/yyyy";
Over and Out
2 comments:
If regional format is yyyy-mm-dd will it work ?
ya - but you'd have to change the split routine!! ... it will be splitting on "-" ... etc...
Post a Comment