UTC/RFC1123 Date/Time Conversion

UTC and RFC1123 are date/time formats found in many conversion programs and internet APIs.  While MultiValue databases and MultiValue (PICK) BASIC provide a lot of built-in date functions, not all version have a UTC or RFC1123 format option.

It is simple to get around this by using the following program:

LOCAL.DATE = DATE()
LOCAL.TIME = TIME()
LOCAL.TIMEZONE = "PST"
CALL CONVERT.DATETIME.TO.UTC1(LOCAL.DATE,LOCAL.TIME,LOCAL.TIMEZONE,UTC,RFC1123.DATE,GMT.INFO,"")
CRT "UTC: ": UTC
CRT "RFC1123: ": RFC1123.DATE
CRT "GMT: ": GMT.INFO
END

This will create a couple different formats:

UTC format: yyyymmddThhmmssZ-

RFC1123 Format: mmm dd, yyyy hh:mm:ss GMT

GMT.INFO<1> =  Greenwich Mean Date

GMT.INFO<2> =  Greenwich Mean Time

Login to Read Complete Article.

menu
menu