as_unix | R Documentation |
This function convert a Date into Unix format: an integer denoting the number of seconds from the origin date, usually "1970-01-01".
as_unix(x = NULL, milliseconds = FALSE, origin = "1970-01-01")
x |
character or Date, in the format "yyyy-mm-dd" or "dd-mm-yyyy". In alternative it is possible to specify the Date also with the time in the format "yyyy-mm-dd hh:mm:ss" or "dd-mm-yyyy hh:mm:ss" |
milliseconds |
logical, if TRUE the output will be converted in milliseconds, otherwise it will be in seconds. |
origin |
character denoting the origin date. |
integer character
as_unix("2023-01-01")
as_unix("01-01-2023")
as_unix("2023-01-01 10:23:23")
as_unix("01-01-2023 10:23:23")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.