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 |
Convert date to Date11. format
date11(date, informat)
date11(date, informat)
date |
Input date |
informat |
Input date format |
Date to Date11. format
date11(date = "19-10-1994",informat = "%d-%m-%Y")
date11(date = "19-10-1994",informat = "%d-%m-%Y")
Convert date to Date9. format
date9(date, informat)
date9(date, informat)
date |
Input date |
informat |
Input date format |
Date to Date9. format\
date9(date = "19-10-1994",informat = "%d-%m-%Y")
date9(date = "19-10-1994",informat = "%d-%m-%Y")
Convert date to ddmmyy10. format
ddmmyy10(date, informat)
ddmmyy10(date, informat)
date |
Input date |
informat |
Input date format |
Date to ddmmyy10. format
ddmmyy10(date = "19-10-1994",informat = "%d-%m-%Y")
ddmmyy10(date = "19-10-1994",informat = "%d-%m-%Y")
Convert date to ddmmyy10. format
ddmmyy8(date, informat)
ddmmyy8(date, informat)
date |
Input date |
informat |
Input date format |
Date to ddmmyy10. format
ddmmyy8(date = "19-10-1994",informat = "%d-%m-%Y")
ddmmyy8(date = "19-10-1994",informat = "%d-%m-%Y")
Convert date to ISO8601 format
iso8601da(date, informat)
iso8601da(date, informat)
date |
Input date |
informat |
Input date format |
Date to ISO8601da. format
iso8601da(date = "19-10-1994",informat = "%d-%m-%Y")
iso8601da(date = "19-10-1994",informat = "%d-%m-%Y")
Convert date and time to ISO8601 format
iso8601dt(date, time, informat)
iso8601dt(date, time, informat)
date |
Input date |
time |
Input time |
informat |
Input date format |
Date and time in ISO8601 format
iso8601dt(date = "19-10-1994",time = "10:10",informat = "%Y-%m-%d %H:%M")
iso8601dt(date = "19-10-1994",time = "10:10",informat = "%Y-%m-%d %H:%M")
Convert SAS Numeric date values to Date
num_date(date)
num_date(date)
date |
numeric date |
SAS date
num_date(20562)
num_date(20562)