GetTimeString

An alternative version in C#:

Sample of usage in C#: