ISO 8601Format 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: 2025.1.9.0
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
C#
public static class ISO8601FormatVB
Public NotInheritable Class ISO8601FormatC++
public ref class ISO8601Format abstract sealedF#
[<AbstractClassAttribute>]
[<SealedAttribute>]
type ISO8601Format = class end- 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);VB
Dim utcText, localTimeText As String
Dim utc As DateTime = DateTime.Now.ToUniversalTime()
Dim localTime As DateTime = DateTime.Now
utcText = utc.ToString(ISO8601Format.BasicDateTimeUniversal)
localTimeText = localTime.ToString(ISO8601Format.ExtendedDateTimeLocal)C++
No code example is currently available or this language may not be supported.F#
No code example is currently available or this language may not be supported.Fields
| BasicDate | Basic date format (yyyyMMdd) |
| BasicDateTimeLocal | Basic local date/time format (yyyyMMddTHHmmss) |
| BasicDateTimeUniversal | Basic universal date/time format (yyyyMMddTHHmmssZ) |
| ExtendedDate | Extended date format (yyyy-MM-dd) |
| ExtendedDateTimeLocal | Extended local date/time format (yyyy-MM-ddTHH:mm:ss) |
| ExtendedDateTimeUniversal | Extended universal date/time format (yyyy-MM-ddTHH:mm:ssZ) |