Welcome Guest | My Membership | Login

Tech Tip: Converting MultiValue Dates to Internet Dates

Article

These days we have to interact with other systems, which also means interacting with other dates and times. UTC dates is a common date that we run into, as well as RFC1123 dates, which are commonly found in web data.

UTC (Universal Time Conversion) is a unique format that, while easy to generate and parse, sometimes can cause confusion.

yyyymmddThhmmssZ = 20100301T100000Z

This translates into 03/01/2010 10:00:00 AM GMT (Greenwich Mean Time).

To convert to GMT requires you to provide some additional information about the date and time information on your servers.

RFC1123 is a common format in e-mails, but can also be found in other web data. While it does the same things as UTC, its format is a little more human readable.

 
mmm dd, yyyy hh:mm:ss GMT = Mar 01 2010 10:00:00 GMT

Again, you see the GMT, while you can use other time zones with RFC1123, many times it's easier to just use GMT.

I have supplied a program that will help you convert your internal date/time information into one of these 2 standard date/time formats:

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
END

You can get the source for this subroutine at:

www.intl-spectrum.com/resource/134/UTC_RFC1123_Conversion.aspx

TechTip_Figure 1

Fig. 1

Do you have a Tech Tip to share? E-mail it to editor@intl-spectrum.com

 

# # #          # # #          # # #

 

Related Articles

  • Convert C#/VB.NET Date/Time to Internal Date

    This Article will show you how to convert a C# or VB.NET Date/Time object into an Internal MultiValue Date. It will show you how to do it using the ICONV functions, and well as how to generate an Internal Date without using the ICONV function.

  • Convert Internal Date into C#/VB.NET Date/Time

    This article will show how to convert a MultiValue (PICK) Internal Date into a DateTime object that you can use in C# and VB.NET. The article will cover how use the OCONV statement, as well as, how to generate the DateTime object without using the OCONV statement.

  • Numeric to Alpha Translation

    Database: D3, Advanced Pick, AREV, jBase, Mentor/PRO, mv*Base, mvEnterpise, OpenInsight, OpenQM, Reality, Ultimate, UniVerse, UniData, UniVision

    The attached subroutine will convert a numeric values to their alphabetic values. The number "4" converts to "four"; "25" converts to twenty five, etc. There is also an option that will allow you to change a numeric value into an alphabetic count. For example, 4 converts to "forth", "25" converts to twenty-fifth.


Return to top