How to Apply the Sys.Date & Sys.time Functions in R (2 Examples)
In this R tutorial you’ll learn how to return the system date and time using the Sys.Date and Sys.time functions.
Example 1: Returning the Current System Time Using the Sys.time() Function
Sys.time() # Using Sys.time() function # [1] "2021-10-11 15:17:01 UTC" |
Sys.time() # Using Sys.time() function # [1] "2021-10-11 15:17:01 UTC"
Example 2: Returning the Current System Date Using the Sys.Date() Function
Sys.Date() # Using Sys.Date() function # [1] "2021-10-11" |
Sys.Date() # Using Sys.Date() function # [1] "2021-10-11"