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”));

You May Also Like

About the Author: rnowik

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.