LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 18 Sep 2008 14:46:59 -0400
Reply-To:   Nathaniel.Wooding@DOM.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject:   Re: Convert ISO datetime to SAS datetime
In-Reply-To:   <ed52c9100809181130l645d0f6dx657a520928d25c85@mail.gmail.com>
Content-Type:   text/plain; charset="US-ASCII"

Jake

A while back, someone pointed out some SAS informats that work with ISO datetimes but do ==>NOT<== appear in the base SAS informats. Rather, they are apparently in the XML libname docs.

The list is:

These formats and informats are available beginning in Release 8.2, specifically for the XML engine support:

INFORMAT DESCRIPTION PATTERN

IS8601DA date YYYY-MM-DD IS8601DN datetime with date portion YYYY-MM-DD IS8601DT datetime YYYY-MM-DDThh:mm:ss[.fffff] IS8601DZ datetime with a time zone YYYY-MM-DDThh:mm:ss[.fffff][Z|[[+-]hh:mm]]

IS8601TM time hh:mm:ss[.fffff] IS8601TZ time with a time zone hh:mm:ss[.fffff][Z|[[+-]hh:mm]]

FORMAT DESCRIPTION PATTERN

IS8601DA date YYYY-MM-DD IS8601DN datetime with date portion YYYY-MM-DD IS8601DT datetime YYYY-MM-DDThh:mm:ss[.fffff] IS8601DZ datetime with a time zone YYYY-MM-DDThh:mm:ss[.fffff][Z|[[+-]hh:mm]]

IS8601TM time hh:mm:ss[.fffff] IS8601TZ time with a time zone hh:mm:ss[.fffff][Z|[[+-]hh:mm]]

INFORMAT DESCRIPTION PATTERN

ND8601DA date YYYYMMDD ND8601DN datetime with date portion ND8601DT datetime YYMMDDHHMMSS ND8601DZ datetime with a time zone ND8601TM time HHMMSS ND8601TZ time with a time zone

The "ND" informat-only equivalents for each "IS" form correspond to "basic" formats for the "extended" forms. "ND" means "non-delimited", that is delimiting characters are omitted, which is an acceptable alternate representation.

Use of the "ND" variants is discouraged in the XML content. Types which are input with "ND" informats should be output with corresponding "IS" standard formats.

Complete documentation for these informats and formats is available in the SAS 9.1 XML LIBNAME Engine User's Guide.

Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

Jake Bee <johbee@GMAIL.COM > To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Convert ISO datetime to SAS datetime 09/18/2008 02:30 PM

Please respond to Jake Bee <johbee@GMAIL.COM >

Does anyone know if SAS has a function to convert ISO datetime values to SAS datetime values.

Thanks!

Jake

CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


Back to: Top of message | Previous page | Main SAS-L page