(Ice cream cone hits forehead)
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
On Fri, Oct 18, 2019 at 2:24 PM JB via use-livecode <
use-livecode@lists.runrev.com> wrote:
> Here is a terminal example;
>
> on mouseUp
> put shell( "date" ) into tData
> answer question tData
> end mous
Here is a terminal example;
on mouseUp
put shell( "date" ) into tData
answer question tData
end mouseUp
JB
> On Oct 18, 2019, at 11:12 AM, Tom Glod via use-livecode
> wrote:
>
> Let me throw my hat into the ring here...lolI wrote this function to
> display time in a specific format
>
Let me throw my hat into the ring here...lolI wrote this function to
display time in a specific format
function TimeDisplay HowManySeconds
local final_output = " days ::"
local running_second_count
local next_calculation
set itemdelimiter to "." -- we are looking at boths sides
I would +1 a deltaTime format, but we might not agree on hours over 24 and
fractions of a second.
> On Oct 17, 2019, at 10:25 PM, Bill Vlahos via use-livecode
> wrote:
>
> All great suggestions.
>
> I mostly wanted to see if there already was such a function - which there
> obviously isn’t.
All great suggestions.
I mostly wanted to see if there already was such a function - which there
obviously isn’t.
But it is great to see several easy ways to built your own.
Thanks all.
Bill Vlahos
> On Oct 17, 2019, at 8:51 AM, Bob Sneidar via use-livecode
> wrote:
>
> The problem with o
The problem with one-liners is that the genius is implicit, not explicit. ;-)
Bob S
> On Oct 17, 2019, at 08:44 , J. Landman Gay via use-livecode
> wrote:
>
> Show-off. :-)
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
___
use-livecode
Show-off. :-)
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 17, 2019 5:22:44 AM Mark Waddingham via use-livecode
wrote:
On 2019-10-17 10:50, Klaus major-k via use-livecode wrote:
save some lines by setting the numberformat
I call it sqltime because it has to be formatted as hh:mm:ss.
function formatTime theTime, theFormat
/*
accepts any valid time and returns the form of the time specified in the
second parameter.
The valid formats are:
sql time: hh:mm:ss (Note: combining sql date from the formatDate()
Save a lot of lines by using "format":
on countdown t
put format("%02d:%02d:%02d",t div 3600,(t mod 3600) div 60,t mod 60) into fld
1
subtract 1 from t
if t < 0 then exit countDown
send "countdown t" to me in (1000-the millisecs mod 1000) millisecs
end countdown
> > Terry J. wrote:
> > N
Hi Mark,
> Am 17.10.2019 um 12:21 schrieb Mark Waddingham via use-livecode
> :
>
> On 2019-10-17 10:50, Klaus major-k via use-livecode wrote:
>> save some lines by setting the numberformat first (lazy moi :-)
>> ...
> Save even more lines by using format, div and mod...
>
> function formatRemai
On 2019-10-17 10:50, Klaus major-k via use-livecode wrote:
save some lines by setting the numberformat first (lazy moi :-)
...
Save even more lines by using format, div and mod...
function formatRemainingTime pSeconds
return format("%02d:%02d:%02d", pSeconds div 3600, (pSeconds mod 3600)
Hi all,
> Am 17.10.2019 um 02:41 schrieb Terry Judd via use-livecode
> :
>
> Not built-in but...
>
> function formatRemainingTime pTime
> put trunc(pTime/3600) into tHours
> put pTime mod 3600 into tTimeX
> put trunc(tTimeX/60) into tMins
> put tTimeX mod 60 into tSecs
> if tHours < 1
> Bill V. wrote:
> I know how to do the math to figure it out but I’m wondering if there
> is a built in function to do this. Convert wants to deal with actual time
> so I would get something like “0:1:15 PM”.
That needs the same energy as the simple math method but as you ask:
1. set the twelve
Perhaps the dateItems format would get you part of the way there.
It seems like I have reinvented this in the past several times.
> On Oct 16, 2019, at 6:41 PM, Terry Judd via use-livecode
> wrote:
>
> Not built-in but...
>
> function formatRemainingTime pTime
> put trunc(pTime/3600) into
Not built-in but...
function formatRemainingTime pTime
put trunc(pTime/3600) into tHours
put pTime mod 3600 into tTimeX
put trunc(tTimeX/60) into tMins
put tTimeX mod 60 into tSecs
if tHours < 10 then put "0" before tHours
if tMins < 10 then put "0" before tMins
if tSecs < 10
15 matches
Mail list logo