As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Tip of the Day:August 27

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

If one has date/time data that includes a space between the date and time, you can read it directly with the anydtdtm informat as long as you put an ampersand (&) after the variable in the input statement, to read past the space. For example:

/* set datestyle option to reflect actual date format */
options datestyle=dmy;
data have;
  informat datetime anydtdtm18.;
  format date date9.;
  format time time8.;
  input datetime &;
  date = datepart(datetime);
  time = timepart(datetime);
14/9/2007 11:25:59
12/7/2010 15:25:59

Submitted by Arthur Tabachneck. Contact me at my Discussion Page.

Feel free to comment on this tip.

Prior tip - Next tip - Random Tip

Submit a Tip