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

Game Editor comments and discussion.

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

Postby ayu04 » Thu Mar 22, 2012 7:20 am

Hello. Does anyone knows how to display date and time in game editor based on system clock of your computer? Thank you .. :))
ayu04
 
Posts: 20
Joined: Fri Nov 18, 2011 1:47 pm
Score: 0 Give a positive score

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

Postby skydereign » Thu Mar 22, 2012 7:24 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

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

Postby ayu04 » Thu Mar 22, 2012 7:31 am

Thank you very much sir for always answering my questionsssss. :))))))) God bless sir.
ayu04
 
Posts: 20
Joined: Fri Nov 18, 2011 1:47 pm
Score: 0 Give a positive score

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

Postby ayu04 » Thu Mar 22, 2012 8:11 am

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
ayu04
 
Posts: 20
Joined: Fri Nov 18, 2011 1:47 pm
Score: 0 Give a positive score

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

Postby ayu04 » Thu Mar 22, 2012 8:20 am

ayy I already get it. Thanks anyway sir. :)
ayu04
 
Posts: 20
Joined: Fri Nov 18, 2011 1:47 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest