Search notes:

SAS: Comparison of time formats hhmm, time and tod

The hhmm. format hours and minutes only. No seconds (but fractions of a minute). No leading zero.
The time format is able to additionally print seconds and fractions of seconds - also without leading zero.
The tod format is like the time format, yet it prints a leading zero if the hour is less than 10.
data _null_;

   h05_m16_32s =  5 * 60 * 60 +
                 16 * 60      +
                 32           +
                 16/100;

   put h05_m16_32s hhmm.   ;   /* 5:17       */
   put h05_m16_32s tod.    ;   /*05:16:32    */
   put h05_m16_32s time.   ;   /* 5:16:32    */

   put h05_m16_32s hhmm11. ;   /*       5:17 */
   put h05_m16_32s tod11.  ;   /*   05:16:32 */
   put h05_m16_32s time11. ;   /*    5:16:32 */

   put h05_m16_32s hhmm11.2;   /*    5:16.54      Note: .54 is a fraction of a minute. */
   put h05_m16_32s tod11.2 ;   /*05:16:32.16 */
   put h05_m16_32s time11.2;   /* 5:16:32.16 */

run;
Github repository about-SAS, path: /programming/formats-informats/time-formats.sas

See also

informats and formats

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/Companie...', 1759337729, '216.73.216.88', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/formats-informats/time-formats(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78