ISO8601Format Class

A string "enumerated" type for formatting date/time values in the various ISO 8601 formats

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public static class ISO8601Format
Inheritance
Object    ISO8601Format

Remarks

These are just format strings. It is up to you to make sure that date/time values are in local time or universal time.

Example

C#
string utcText, localTimeText;
DateTime utc = DateTime.Now.ToUniversalTime();
DateTime localTime = DateTime.Now;

utcText = utc.ToString(ISO8601Format.BasicDateTimeUniversal);
localTimeText= localTime.ToString(ISO8601Format.ExtendedDateTimeLocal);

Fields

BasicDateBasic date format (yyyyMMdd)
BasicDateTimeLocalBasic local date/time format (yyyyMMddTHHmmss)
BasicDateTimeUniversalBasic universal date/time format (yyyyMMddTHHmmssZ)
ExtendedDateExtended date format (yyyy-MM-dd)
ExtendedDateTimeLocalExtended local date/time format (yyyy-MM-ddTHH:mm:ss)
ExtendedDateTimeUniversalExtended universal date/time format (yyyy-MM-ddTHH:mm:ssZ)

See Also