EVOLUTION-MANAGER
Edit File: Sys.time.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Get Current Date and Time</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for Sys.time {base}"><tr><td>Sys.time {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Get Current Date and Time</h2> <h3>Description</h3> <p><code>Sys.time</code> and <code>Sys.Date</code> returns the system's idea of the current date with and without time. </p> <h3>Usage</h3> <pre> Sys.time() Sys.Date() </pre> <h3>Details</h3> <p><code>Sys.time</code> returns an absolute date-time value which can be converted to various time zones and may return different days. </p> <p><code>Sys.Date</code> returns the current day in the current <a href="timezones.html">time zone</a>. </p> <h3>Value</h3> <p><code>Sys.time</code> returns an object of class <code>"POSIXct"</code> (see <a href="DateTimeClasses.html">DateTimeClasses</a>). On almost all systems it will have sub-second accuracy, possibly microseconds or better. On Windows it increments in clock ticks (usually 1/60 of a second) reported to millisecond accuracy. </p> <p><code>Sys.Date</code> returns an object of class <code>"Date"</code> (see <a href="Dates.html">Date</a>). </p> <h3>Note</h3> <p><code>Sys.time</code> may return fractional seconds, but they are ignored by the default conversions (e.g., printing) for class <code>"POSIXct"</code>. See the examples and <code><a href="strptime.html">format.POSIXct</a></code> for ways to reveal them. </p> <h3>See Also</h3> <p><code><a href="date.html">date</a></code> for the system time in a fixed-format character string. </p> <p><code><a href="timezones.html">Sys.timezone</a></code>. </p> <p><code><a href="system.time.html">system.time</a></code> for measuring elapsed/CPU time of expressions. </p> <h3>Examples</h3> <pre> Sys.time() ## print with possibly greater accuracy: op <- options(digits.secs = 6) Sys.time() options(op) ## locale-specific version of date() format(Sys.time(), "%a %b %d %X %Y") Sys.Date() </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>