Exampler.org SAS PYTHON HTML
SAS Introduction
SAS Abs
SAS Anydigit
SAS ASC
SAS Case Stmnt.
SAS Ceiling
SAS Change type
SAS Char
SAS CMISS
SAS Coalesc
SAS Coalescec
SAS Concatenate
SAS Constant
SAS Create Table
SAS DateTime
SAS Day
SAS Find
SAS Floor
SAS HMS
SAS Holiday
SAS HOUR
SAS Import
SAS Informats
SAS Inobs
SAS Input Stmt.
SAS Int
SAS INTNX
SAS Length
SAS Libname
SAS Loops
SAS Minute
SAS Month
SAS MDY
SAS NMISS
SAS Notdigit
SAS Lowercase
SAS Outobs
SAS Put Stmt.
SAS Rename
SAS Round
SAS Scan
SAS Substr
SAS Sum
SAS STNAME
SAS STNAMEL
SAS Time
SAS Trunc
SAS Uppercase
SAS Week
SAS Year
SAS Financial Functions
SAS Compound

SAS Time

What is it?

Syntax:

  • Time();

SAS Time Statement:


 SAS Time Example:




Data work.my_data_file;

    Result_1 = Time();

    Result_2 = PUT(Result_1, nltimap15.);
Run;





What's happening in the script above?

  • The Time function simply returns the system time which SAS returns as a DOUBLE.
  • The PUT function is taking the SAS Current System Date and re-formatting it to simplify read ability.


Time Example:

Variable Input Output Description
Result_1 58513.064103 The SAS System Time based on the system Timezone
Result_2 58513.064103 04:15:13 PM The formatted System time using the PUT function and the nltimap15. format

See also; PUT Function

Connect via LinkedIn

Kevin Regan

Have an article, idea, found a typo, want to contribute? Shoot me an email Here


Below are links to some Udemy Data Science Courses. I've been using Udemy for a number of years now, and I've found their courses super helpful, maybe you will also.