Page 1 of 1

How to display date and time in game editor? :)

PostPosted: Thu Mar 22, 2012 7:20 am
by ayu04
Hello. Does anyone knows how to display date and time in game editor based on system clock of your computer? Thank you .. :))

Re: How to display date and time in game editor? :)

PostPosted: Thu Mar 22, 2012 7:24 am
by skydereign
http://game-editor.com/docs/script_reference.htm wrote:getTime: Get system date and time.
stTime getTime();
The stTime is a struct with follow members:

sec: Seconds after minute (0 - 59)
min: Minutes after hour (0 - 59)
hour: Hours since midnight (0 - 23)

mday: Day of month (1 - 31)
mon: Month (1 - 12; January = 1)
year: Year (current year)

wday: Day of week (0 - 6; Sunday = 0)
yday: Day of year (0 - 365)

sec_utc: Number of seconds elapsed since midnight (00:00:00), January 1, 1970 (coordinated universal time)


Script Editor Syntax:
stTime t = getTime();
textNumber = t.sec; //to show the seconds
Download the sample here

Here's the getTime function as found in the script reference. Essentially you can use this function to get a stTime struct, from which you can extract the parts of the date you want.

Re: How to display date and time in game editor? :)

PostPosted: Thu Mar 22, 2012 7:31 am
by ayu04
Thank you very much sir for always answering my questionsssss. :))))))) God bless sir.

Re: How to display date and time in game editor? :)

PostPosted: Thu Mar 22, 2012 8:11 am
by ayu04
Sir I'm currently doing what you have answered, but there was an error in getTime... Where should I put the code that you have given? Sorry for disturbing you sir. :D

Re: How to display date and time in game editor? :)

PostPosted: Thu Mar 22, 2012 8:20 am
by ayu04
ayy I already get it. Thanks anyway sir. :)