English
Source / code snippets

minutes Uhrzeit inverse converting

 

Jörg
Sellmeyer
of these both Procedures can a arbitrary Time in minutes umgerechnet and be inverse, a Minutenangabe in a Uhrzeit.
CompileMarkSeparation
Code von Jörg Sellmeyer

Proc Time2Min

    Parameters T$
    Declare Std&,Min&
    Std& = Val(SubStr$(T$,1,":")) * 60
    Min& = Val(SubStr$(T$,2,":"))
    Return Std& + Min&

EndProc

Proc Min2Time

    Parameters T&
    Declare Std%,Min%
    Min% = T& Mod 60
    Std% = (T& - Min%) / 60- Min% * 60
    Return Str$(Std%) + ":" + Format$("00",Min%)

EndProc

Randomize
Print Time2Min(Time$(0))
Print Min2Time(Time2Min(Time$(0)))
Print
Print Time2Min("8:46")
Print Min2Time(Rnd(24 * 60 + 1))
WaitInput
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/08/08  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.235 Views

Untitledvor 0 min.
Member 862464105/13/24
H.Brill10/09/21
Manfred Barei11/11/15
Uwe Lang02/06/15
More...

Themeninformationen

this Topic has 1 subscriber:

Jörg Sellmeyer (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie