Reference implementation code of date and time under DOS

Time:2020-3-29

%Date% output: Week * yyyy / mm / DD (e.g. Thursday 2008 / 12 / 18)
Reference format:% date: ~ x, y%
X = starting coordinate, y = number of characters to be intercepted (coordinates from 0 to 13)

Such as:
%date:~4,4% –>yyyy
%date:~9,2% –>mm
%date:~12,2% –dd
For example, take out the date in yyyymmdd format:% date: ~ 4,4%% date: ~ 9,2%% date: ~ 12,2% — > 20081218

%Time% output: hh24: Mi: ss.ms (e.g.: 10:49:12.17)
Reference format:% time: ~ x, y%
X = starting coordinate, y = number of characters to be intercepted (coordinates from 0 to 12)

Such as:
%time:~0,2% –>hh
%time:~3,2% –>mi
%time:~6,2% –>ss
For example, take out the date in yyyymmdd format:% time: ~ 0,2%% time: ~ 3,2%% time: ~ 6,2% — > 104912

Output formatted date time: ~ 4,4%% date: ~ 9,2%% date: ~ 12,2%% time: ~ 0,2%% time: ~ 3,2%% time: ~ 6,2% — > 20081218104912

Recommended Today

Configure Apache to support PHP in the Apache main configuration file httpd.conf Include custom profile in

In Apache’s main configuration file / conf/ http.conf Add at the bottom Include “D:workspace_phpapache-php.conf” The file path can be any In D: workspace_ Create under PHP file apache- php.conf file Its specific content is [html] view plain copy PHP-Module setup LoadFile “D:/xampp/php/php5ts.dll” LoadModule php5_module “D:/xampp/php/php5apache2_2.dll” <FilesMatch “.php$”> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch “.phps$”> SetHandler application/x-httpd-php-source </FilesMatch> […]