how to know pm or am C# code example Example: how to know pm or am C# dateTime.ToString("tt", CultureInfo.InvariantCulture);