Learn R Programming

xefun (version 0.1.5)

date_from: start date by range

Description

The date before a specified date by date_range.

Usage

date_from(date_range, to = Sys.Date(), default_from = "1000-01-01")

Value

It returns the start date of a date_range with a specified end date.

Arguments

date_range

date range, available value including nd, nm, mtd, qtd, ytd, ny, max.

to

a date, default is current system date.

default_from

the default date when date_range is sett to max

Examples

Run this code
date_from(3)
date_from('3d')

date_from('3m')
date_from('3q')
date_from('3y')

date_from('mtd')
date_from('qtd')
date_from('ytd')

Run the code above in your browser using DataLab