How would I transfer this to actual system time?
Like, instead of it returning 74893028 or whatever, having it return like 9:07 AM.
How would I transfer this to actual system time?
Like, instead of it returning 74893028 or whatever, having it return like 9:07 AM.
SCAR Code:{*******************************************************************************
function TheTime : string;
By: RsN (fixed by Ron)
Description: Returns current time as a string
*******************************************************************************}
function TheTime: string;
var
Hour, Mins, Sec, MSec: Word;
PAM: string;
begin
DecodeTime(Now, Hour, Mins, Sec, MSec);
PAM := 'AM';
if (Hour > 12) then
begin
Hour := Hour - 12;
PAM := 'PM';
end else if (Hour = 12) then
PAM := 'PM'
else if (Hour = 0) then
Hour := 12;
Result := (Padz(IntToStr(Hour), 2) + ':' + Padz(IntToStr(Mins), 2) + ':' + Padz(IntToStr(Sec), 2) + ' ' + PAM);
end;
that one is in srl
Oh. Thanks!
I probably would've been better off just searching, but I figured someone like you'd get it to me faster.
Thanks!
Besides, GetSystemTime returns the UpTime, not the local time.
Verrekte Koekwous
What do you mean the "UpTime"?
Your computers clock in military time.
(Scripts outdated until I update for new SRL changes)
AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
Summer = me busy, won't be around much.
Oh. I never knew that was called UpTime =/
But anyways. Thanks for the help.
Close the thread please?
"military time" is alot bttr than AM, PM.
Code:
- Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
- Solarwind: Dude, you are like... t3h s3x.
- Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
- benjaa: woah.... Jukka is the man Guildminer pwns all
- NaumanAkhlaQ: And JuKKa Is my Her0!






UpTime isn't 24-hour time (what the military and stuff tend to use). It is the time the computer has been up and running. I'm assuming it starts when the computer boots.
Oops, I'm thinking about Now time.
(Scripts outdated until I update for new SRL changes)
AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
Summer = me busy, won't be around much.
There are currently 1 users browsing this thread. (0 members and 1 guests)