O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 9.12 Creating a SAS Time Value from a Character Value

Goal

Read a character value that cannot be read with an existing SAS time informat or function to create a SAS time value.

Example Features

Featured StepPROC FORMAT and DATA step
Featured Step Options and StatementsPICTURE format, INPUT and PUT functions

Input Data Set

Data set INCIDENTS has power supply information for five incidents. Character variables IN_NOTED and RESP_NOTED records the times each incident was noted and responded to. The time values are not stored in a way that can be read with a single time informat.

                           INCIDENTS

  Obs    location    type           in_noted       resp_noted 1 SW009A Surge 33.49 38.01 2 N0003Q Drop 9:13.69 12:15.02 3 ESE01C Transformer 8:00:00.33 10:21:06.43 4 NW503K ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required