hello
i use a label to display date in format "d/M/yyyy" by using this line
but if the user adjust the region from windows control panel "Short date :dd-MM-yyyy" then label display the date in this format dd-MM-yyyy and the error "String was not recognized as a valid DateTime." appear
how can i display date in format "d/M/yyyy" without return the format from region setting?
thank you
i use a label to display date in format "d/M/yyyy" by using this line
Code:
datenow.Text = DateTime.ParseExact(datenow.Text, "d/M/yyyy", CultureInfo.InvariantCulture).ToString
how can i display date in format "d/M/yyyy" without return the format from region setting?
thank you