Package 'SASdates'

Title: Convert the Dates to 'SAS' Formats
Description: Converts the dates to different 'SAS' date formats. In 'SAS' dates are a special case of numeric values. Each day is assigned a specific numeric value, starting from January 1, 1960. This date is assigned the date value 0, and the next date has a date value of 1 and so on. The previous days to this date are represented by -1 , -2 and so on. With this approach, 'SAS' can represent any date in the future or any date in the past. There are many date formats used in 'SAS' to represent date-time. Here, we try to develop functions which will convert the date to different 'SAS' date formats.
Authors: Mahesh Divakaran [aut, cre]
Maintainer: Mahesh Divakaran <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-13 03:42:38 UTC
Source: https://github.com/cran/SASdates

Help Index


Convert date to Date11. format

Description

Convert date to Date11. format

Usage

date11(date, informat)

Arguments

date

Input date

informat

Input date format

Value

Date to Date11. format

Examples

date11(date = "19-10-1994",informat = "%d-%m-%Y")

Convert date to Date9. format

Description

Convert date to Date9. format

Usage

date9(date, informat)

Arguments

date

Input date

informat

Input date format

Value

Date to Date9. format\

Examples

date9(date = "19-10-1994",informat = "%d-%m-%Y")

Convert date to ddmmyy10. format

Description

Convert date to ddmmyy10. format

Usage

ddmmyy10(date, informat)

Arguments

date

Input date

informat

Input date format

Value

Date to ddmmyy10. format

Examples

ddmmyy10(date = "19-10-1994",informat = "%d-%m-%Y")

Convert date to ddmmyy10. format

Description

Convert date to ddmmyy10. format

Usage

ddmmyy8(date, informat)

Arguments

date

Input date

informat

Input date format

Value

Date to ddmmyy10. format

Examples

ddmmyy8(date = "19-10-1994",informat = "%d-%m-%Y")

Convert date to ISO8601 format

Description

Convert date to ISO8601 format

Usage

iso8601da(date, informat)

Arguments

date

Input date

informat

Input date format

Value

Date to ISO8601da. format

Examples

iso8601da(date = "19-10-1994",informat = "%d-%m-%Y")

Convert date and time to ISO8601 format

Description

Convert date and time to ISO8601 format

Usage

iso8601dt(date, time, informat)

Arguments

date

Input date

time

Input time

informat

Input date format

Value

Date and time in ISO8601 format

Examples

iso8601dt(date = "19-10-1994",time = "10:10",informat = "%Y-%m-%d %H:%M")

Convert SAS Numeric date values to Date

Description

Convert SAS Numeric date values to Date

Usage

num_date(date)

Arguments

date

numeric date

Value

SAS date

Examples

num_date(20562)