## How to convert a Unix datetime to a SAS datetime

You can convert a Unix datetime to a SAS datetime by adding the number of seconds in 10 years. The Number of seconds between 01JAN1960 and 01JAN1970 is 315619200.

Skip to content
# How To

## How to convert a Unix datetime to a SAS datetime

## How to Print Empty SAS dataset information to the output window?

## How to determine if the external file is empty in SAS?

## How to Use Character Values on a Macro %DO Loop?

## How to Calculate a Weighted Average in SAS?

## How to Copy datasets in SAS?

## How to truncate Decimals in SAS?

## How to Round Numbers in SAS?

## How to get today’s date in SAS?

BySubhro

You can convert a Unix datetime to a SAS datetime by adding the number of seconds in 10 years. The Number of seconds between 01JAN1960 and 01JAN1970 is 315619200.

BySubhro

If the file is empty, the PROC PRINT can read…

BySubhro

The macro checks determine if the external file is empty…

BySubhro

The macro facility does not permit character values on an…

BySubhro

A weighted average is a way of determining a set…

BySubhro

You can use high-level procedures PROC COPY and PROC DATASETS for moving and copying SAS datasets between libraries.They provide much more control over what data sets you want to move and this approach is more efficient.

BySubhro

Sometimes you may need to truncate numeric values to a specified number of decimal places without rounding. In this article, you will learn to truncate decimals in SAS, without rounding.

BySubhro

The ROUND function rounds the numbers to the nearest multiple of the rounding factor. Round up or ceil in SAS uses ceil() function which rounds up the column in SAS. Round down in SAS or floor in SAS uses floor() function which rounds down.

BySubhro

To get today’s date in SAS, you can either the today() or date() functions. They are equivalent and represents the number of days since January 1, 1960. Datetime() function returns SAS value represents the number of seconds between January 1, 1960, and the current time.

x

x