How do I get system date and time

Get help using Construct 2

Post » Fri Sep 25, 2015 6:44 am

Is there a way to get the system date and time (from the used device)?

For example
On Start
Set time_variable to System.time (10:35:00)
Set date_variable to System.date (25. SEP 2015)

Thanks :)
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,118
Reputation: 27,793


Post » Fri Sep 25, 2015 9:53 am

Thank you, I gonna check it at home :)
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,118
Reputation: 27,793

Post » Sat Sep 26, 2015 6:07 am

Lordshiva1948 wrote:AndreasR Easy like this

https://www.dropbox.com/s/vdg5w036m00lu ... .capx?dl=0


Exactly what I needed :) Thank you!
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,118
Reputation: 27,793

Post » Sat Sep 26, 2015 9:25 am

@Lordshiva1948

The function results the time like "Sat Sep 26 2015 11:23:42 GMT+0200 (Mitteleuropäische Sommerzeit)"
Is there a way to get only "Sep 26 2015 11:23:42" or only the date "Sep 26 2015"?
I'm not familiar with JavaScript :/
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,118
Reputation: 27,793

Post » Sat Sep 26, 2015 10:01 am

rexrainbow does a very nice time/date plugin - or you could just manipulate the returned string (left$?)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sat Sep 26, 2015 10:04 am

RamPackWobble wrote:rexrainbow does a very nice time/date plugin - or you could just manipulate the returned string (left$?)


Already have thought about the manipulation, but the date format differs from each device isn't it?
So it would be the best to only fetch date & time :)

can you attach a link to the mentioned plugin?

Thanks!
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,118
Reputation: 27,793

Post » Sat Sep 26, 2015 11:36 am

can you attach a link to the mentioned plugin?


well here is a link to a list maintained by Kyatric with most (all?) of the plugins available

c2-plugins-and-behaviors-list_t65170

and here is a link to the plugin

viewtopic.php?t=63492&start=0
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sat Sep 26, 2015 1:45 pm

Simples, as RamPackWobble mentioned, just count the characters with left.

left((Browser.ExecJS("Date()")),16)
Bushy Ball\Boatman Bill\Sticky Web\Snake

Image ImageImageImage

During the gold rush it was a good time to be in the pick and shovel business
B
45
S
13
Posts: 247
Reputation: 5,247


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish and 16 guests

cron