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"

Example 2: Returning the Current System Date Using the Sys.Date() Function

Sys.Date()                     # Using Sys.Date() function
# [1] "2021-10-11"

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top