Quicknote – writing a uk date in C#

If you are writing out datetime.now on a machine set to en-gb, you should not need to worry about globalisation if you require uk formatted dates. However if you do need to force the format, you can using the follow ToString overload on DateTime.Now (requires system.globalisation namespace).

DateTime.Now.ToString(new CultureInfo(“en-GB”));

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>