GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | TIMEHMS

Edit History

TIMEHMS

TIMEHMS hms| timer, BYREF h, BYREF m, BYREF s

Home > Reference > Date

Converts a time-value hms or timer to hours h, minutes m and seconds s integer values.

Time-value can be:

  • a string with the format “hh:mm:ss” as returned by TIME
  • a number of seconds from midnight as returned by TIMER

See also TIME and TIMER.

Example 1: Time string returned by TIME()

t = time()

TIMEHMS  t, h, m, s

print "Hours  : "; h
print "Minutes: "; m
print "Seconds: "; s

' Output:
' Hours  : 16
' Minutes: 15
' Seconds: 22

Example 2: Seconds returned by TIMER()

t = timer()

TIMEHMS  t, h, m, s

print "Hours  : "; h
print "Minutes: "; m
print "Seconds: "; s

' Output:
' Hours  : 16
' Minutes: 15
' Seconds: 22
Code samples using TIMEHMS
analog clock.bas   clock.bas   clock.bas  
Date
DATE   DATEDMY   DATEFMT   JULIAN   TICKS   TIME   TIMEHMS   TIMER   TIMESTAMP   WEEKDAY  
This page was last edited on Fri, 1 Sep 2023 16:28:12 +0200 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.