Movatterモバイル変換


[0]ホーム

URL:


rdrr.io

Sys.time: Get Current Date and Time

Sys.timeR Documentation

Get Current Date and Time

Description

Sys.time andSys.Date returns the system's idea of thecurrent date with and without time.

Usage

Sys.time()Sys.Date()

Details

Sys.time returns an absolute date-time value which can beconverted to various time zones and may return different days.

Sys.Date returns the current day in the current time zone.

Value

Sys.time returns an object of class"POSIXct" (seeDateTimeClasses). On almost all systems it will havesub-second accuracy, possibly microseconds or better. On Windows itincrements in clock ticks (usually 1/60 of a second) reported tomillisecond accuracy.

Sys.Date returns an object of class"Date" (see Date).

Note

Sys.time may return fractional seconds, but they are ignored bythe default conversions (e.g., printing) for class"POSIXct".See the examples andformat.POSIXct for ways to reveal them.

See Also

date for the system time in a fixed-format characterstring.

Sys.timezone.

system.time for measuring elapsed/CPU time of expressions.

Examples

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()

What can we improve?

R Package Documentation

Browse R Packages

We want your feedback!

Note that we can't provide technical support on individual packages. You should contact the package authors for that.

 
Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, readEmbedding Snippets.

Close

[8]ページ先頭

©2009-2026 Movatter.jp