Learn R Programming

LexisNexisTools (version 0.2.2)

lnt_asDate: Convert Strings to dates

Description

Converts dates from string formats common in LexisNexis to a date object.

Usage

lnt_asDate(x, format = "auto", locale = "auto")

Arguments

x

A character object to be converted.

format

Either "auto" to guess the format based on a common order of day, month and year or provide a custom format (see stri_datetime_format for format options).

locale

Value

This function returns an object of class date.

Examples

Run this code
# NOT RUN {
LNToutput <- lnt_read(lnt_sample(), convert_date = FALSE)
d <- lnt_asDate(LNToutput@meta$Date)
d
# }

Run the code above in your browser using DataLab