Quote Originally Posted by nbrege View Post
I have a program that is used by people from all over the world. It writes a date/time stamp to an online database. After looking at the time stamps, I see they are different formats, based on the users location. How can I format the datetime string to always be US EST, regardless of the locale?
Ideally don't store dates as strings in the database, store them as dates (assuming your database has a date / datetime data type), if you must store them as strings you are probably better storing them in a standard, non-region specific, format e.g. https://blog.ansi.org/2019/01/iso-da...ells-standard/

If you must store it in EST then you can always use .ToString() on the date to get it into a string - https://learn.microsoft.com/en-us/do...format-strings should get you started on how to format the resulting string.