NotToday Posted March 28, 2014 Share Posted March 28, 2014 Bir siteden çektiğim 1395993544 tarzı bir veri var.Son güncelleme zamanından üzerinden ne kadar süre geçtiğini belirtiyor.Sanırım msec cinsinde.Bunu saat dakikaya nasıl çevirebilirim? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted March 28, 2014 Share Posted March 28, 2014 tabii ki biraz matematik ile; saniye = Math.Round((1395993544/1000)) dakika = Math.Round((1395993544/1000)/60) saat = Math.Round(((1395993544/1000)/60)/60) gun = Math.Round((((1395993544/1000)/60)/60)/24) Dialog.Message("", "Geçen Süre: " .. gun .. " gün veya " .. saat .. " saat veya " .. dakika .. " dakika veya " .. saniye .. " saniye") Quote Link to comment Share on other sites More sharing options...
Administrator sk8er_boi Posted March 28, 2014 Administrator Share Posted March 28, 2014 http://www.epochconverter.com/ Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted March 28, 2014 Share Posted March 28, 2014 Genelde bu fonksiyon kullanılır ; function SecondsToClock(sSeconds) local nSeconds = String.ToNumber(sSeconds) if nSeconds == 0 then --return nil; return "00:00:00"; else local nHours = string.format("%02.f", Math.Floor(nSeconds/3600)); local nMins = string.format("%02.f", Math.Floor(nSeconds/60 - (nHours*60))); local nSecs = string.format("%02.f", Math.Floor(nSeconds - nHours*3600 - nMins *60)); return nHours..":"..nMins..":"..nSecs end end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.