Get Online Time and Date using web

Hello everyone.
This is my tutorial to get time & date online using web component…

To get online date & time you required 3 component…

  1. Web Component to get date & time
  2. Lable to show date & time in app
  3. Clock to refresh or get data from web in every second ( You can change Clock Interval)

IMG_20200121_214451

In this block i used to get data from web in every 3 second

In this 2nd block when I got response from web in text format
In lable 1 I just set the limit from where to get response .
In 2nd label I just set the limit till where the response text will end ( if you don’t use such block then whole site will shown ) . The length & start block i use to limit the length of response…
In 3rd label I just replace the unwanted response text & only show the Time & Date…

Website I used to get data is :
https://www.worldtimezone.com/time/wtzresult.php?CiID=14799

Timedate.aia (2.3 KB)

Thank You. Hope you all Like the Tutorial…

6 Likes

I would just put the aia in the post and don’t expect a response first. Can you explain also why you use all the segment and replace blocks. Maybe show what you are getting from the website. Your image is cut of i see.

2 Likes

Ya i just use website & i post the website link also

Ya i will edit the post… & also explain about the use of that segment, replace block & all…

Sorry for inconvenience & Thanks for help…

1 Like

Hi!.. How could I get the same data in Spanish?

If you will. Provide me any site I can try…

Hi @Ariel_Gallo

Why not try an NTP server?
It gives you most accurate and local time.

1 Like

That’s one of the Best Solution…

Thanks I’ll try

You can try this…
This aia also taking time from web but in this I used the world time site…
Just select your country… Paste that url in web url & alll done…

3 Likes

thanks, you have been a great help!

These are the best API services for getting time (Free)
http://worldtimeapi.org/
http://worldclockapi.com/
These are top results on Google and the best
Search on Google: time api

1 Like

Ya i am using world clock site to get time…
Using web…
Thank you @sonumohammad333 for sharing such valuable APIs…

1 Like

Who I show only time and date in lable in form of MM/DD/YYYY hh:mm:ss
Because I want to make a countdown.

Hey, Which is the best method to get OnlineDateTime By Using this Extension DateTools : Some tools to work with date and time which is created by @vknow360

Or I Should use this api
http://worldclockapi.com/
http://worldtimeapi.org/
Provided By @sonumohammad333

1 Like

Hey Use This
http://worldtimeapi.org/api/ip

This will return data in json format then pick unixtime by kodular dictionary block

1 Like

Extension is better as we all know @vknow360 is always there to solve the issue …

3 Likes

Thank you. when I checked it. these API doesn’t fulfil my needs

2 Likes

There is a very old topic
It gives a different but successful way
https://community.kodular.io/t/getting-the-time-and-date-using-api/28313/8

good job

That using api…
I am using website not api…

:grin:

You can add the other way and this topic will be more useful

We don’t know if your method or the method I published works forever

1 Like