I have a timestamp that I would like to represent as two lines. Currently, I am using “timeStamp.ToString(“dd/MM/yyyy \n hh:mm:ss tt”).”
I would like to preserve the culture for this so that, when globalization is a concern, this time stamp is displayed correctly.
Is there a simple way to achieve this? Or, do I need to do something like… string.Format(“{0}\n{1}”, timeStamp.Date.ToString(), timeStamp.Time.ToString() ); ?
Thanks
You can use Date and Time Format Strings to format a DateTime value in a custom way: