Search notes:

R package: lubridate

lubridate makes it easier to work with dates and time.

Convert seconds to hours and minutes

library(lubridate);

for (sec in seq(36300, 92000, by=7*60)) {
   sec_p <- seconds_to_period(sec);
   hr_mi <- sprintf('%02d:%02d', sec_p@hour, minute(sec_p));
   print(hr_mi);
}

ymd - mdy - dmy

library(lubridate)

dt_1 <- ymd('20170213')
dt_2 <- mdy('09282016')
dt_3 <- dmy('22032017')

dt_1
# [1] "2017-02-13 UTC"

dt_2
# [1] "2016-09-28 UTC"

dt_3
# [1] "2017-03-22 UTC"
Github repository about-r, path: /packages/lubridate/ymd-mdy-dmy.R

See also

R packages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758207817, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/packages/lubridate/index(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78