lnt_asDate {LexisNexisTools}R Documentation

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

A ISO 639-1 locale code (see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).

...

Not used.

Value

This function returns an object of class date.

Examples

LNToutput <- lnt_read(lnt_sample(copy = FALSE), convert_date = FALSE)
d <- lnt_asDate(LNToutput@meta$Date)
d

[Package LexisNexisTools version 1.0.0 Index]