Free ISO8601 component

The XHTML WYSIWYG Editor For Desktop & Web Applications

ISO8601 Component

Overview

ISO8601 is an industry-standard way of formatting dates. The format looks like 2003-09-16 or 2003-09-16T19:15:30.45. It is the preferred way to store dates in XML because dates can be sorted using sort algorithms designed for string data. This component converts VB/VBScript Date object to ISO8601 format and back to VB/VBScript Date object. The component can also be used to construct a Date object. This component can be used in environments that support COM such as Active Server Pages, Windows Scripting Host, Visual Basic, etc.

License
Freeware
Type
ActiveX DLL for 32 bit OS
Version
1.2
File Name
XISO8601.dll
Download Package
x-iso8601.zip

Download

Download ISO8601 Component

Installation Instructions

  1. Move the dll to a directory like: C:\Program Files\XStandard\Bin\.
  2. Open a command prompt and cd to the directory where the dll is located.
  3. Type regsvr32 XISO8601.dll
  4. Grant "Read & Execute" file permissions on this dll to Everyone.

Note, on Microsoft Vista, the command prompt must be "Run as administrator" as shown in the screen shot below.

Context menu for the command prompt showing the option to run as administrator.

Uninstall Instructions

  1. Open a command prompt and cd to the directory where the dll is located.
  2. Type regsvr32 -u XISO8601.dll

API Reference: ProgID: XStandard.ISO8601

Function Convert(ISO8601 As String) As Date

Convert ISO8601 formatted string to Date object.

Property Date As Date

Set a new date or get a date that was contructured by this object.

Property Day As Long

Set or get the day of the month.

Property DayOfWeek As String

(read-only)
Get the day of the week. Example: Monday or Tuesday.

Property Hours As Long

Set or get the hour.

Property LogFile As String

Path to log file.

Property Milliseconds As Long

Set or get milliseconds.

Property Minutes As Long

Set or get minutes.

Property Month As Long

Set or get the month of the year.

Sub Reset()

Reset all values to current date and time.

Property Seconds As Long

Set or get seconds.

Property String As String

Set or get the date in ISO8601 format.

Property Version As String

(read-only)
Product version

Property Year As Long

Get or set a 4-digit year.

Examples

The examples below are for Active Server Pages. For Windows Scripting Host or Visual Basic, replace Server.CreateObject with CreateObject and replace Resonse.Write with MsgBox.

Convert a VBScript Date object into an ISO8601 formatted string

  1. <%
  2. Dim objISO8601
  3. Set objISO8601 = Server.CreateObject("XStandard.ISO8601")
  4. objISO8601.Date = DateAdd("d", 10, Now())
  5. Response.Write objISO8601.String
  6. Set objISO8601 = Nothing
  7. %>

Convert an ISO8601 formatted string into a VBScript Date object

  1. <%
  2. Dim objISO8601
  3. Set objISO8601 = Server.CreateObject("XStandard.ISO8601")
  4. Response.Write objISO8601.Convert("2003-11-11T10:15:00")
  5. Set objISO8601 = Nothing
  6. %>