day function to ?
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

day function to ?

Started by Typhoon, 14 February, 2004, 18:20:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Typhoon

just a quick one !,,,
how can i get this to work in days also ??

if time ~= nil then 
          			local s,e,hours,mins = strfind(time, "(%d+):(%d+)") 
            			local x = (tonumber(hours)*60) + tonumber(mins)


Typhoon?



plop

did you manage it allready?
if so pls post the answer.
i absolutly don't mind 2 help ppl from my hub, but i would like 2 see that help/info return here on the forum so every1 can benefit from it.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Typhoon

yep i managed and thx again plop... i came to this solution in the end....

if time ~= nil then 
          			local s,e,days,hours,mins = strfind(time, "(%d+):(%d+):(%d+)") 
            			local x = (tonumber(days) * 60*24) + (tonumber(hours)*60) + tonumber(mins)

days:hours:mins   and it works just fine!!

but feel free to come with even more hints i am a bit slow lately cause its gettinng very near the end og my education :) ....



SMF spam blocked by CleanTalk