Search notes:

VBA - language: a date is a double

Internally, a date is stored as a double that stores the (fractional) days since December 30th 1899.
option explicit

sub main() ' {

    double_as_date 0.0                                       ' 1899-12-30 00:00:00
    double_as_date 0.5                                       ' 1899-12-30 12:00:00

    double_as_date 365.0                                     ' 1900-12-30 00:00:00

    double_as_date 43339                                     ' 2018-08-27 00:00:00
    double_as_date 43339 + 11/24 + 27/24/60 + 39/24/60/60    ' 2018-08-27 11:27:39

end sub ' }

sub double_as_date(dbl as double) ' {

    dim dt as date
    dt = dbl
    debug.print format(dt, "yyyy-mm-dd hh:nn:ss")

end sub ' }
Github repository about-VBA, path: /language/datatypes/date/internal.bas

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...', 1758201192, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/language/datatypes/date/internal(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78