Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I get any webservice date/time into FM var?

Featured Replies

Is it possible.. seems like there are other lanuages to do this.. but

I don't want to use a locate clients Get (current ) date time.. I need a external date/time some how

Is there a simple way to GET, import or  use a URL(input) way to acquire a external date/time from a webservice

I looked around..just could find a simple answer staying in FM

Has anyone done this.. if there is single URL... that only shows this?

 

Thanks again...

their are a couple ways to do this, 1 would be open a website like http://tycho.usno.navy.mil/timer.html in the webviewer  and pull the time from their use

set field [ fieldname; GetAsText ( GetLayoutObjectAttribute ( "webviewername" ; "content") ) ]

to put the website source into a text field and extract the time. 

 

or you can use an xml feed and grab the time. both are relativity simple to do.

if you need help let me know what time zone you need and I will make it for you.

What's the intended use of this?

 

Is there a reason that Get(CurrentHostTimestamp) won't work for you?

  • Author

the current  HOST;;  I don't know the func or use server stuff;;    i would assum the user can just back the host or client data backward.  i want an external reference so to calc a rental process for my app..   be simple    I LIKE THE

  • Author

tried to find this??   Would appreciate more help thank you so much

 

i can open URL  see contents on site navy site... and can parse  easily if i can grab date to a field

 

Can't just can't  figure where to find this function      and what about 2 parameters "webviewername" ; "content"

 

 

 

GetLayoutObjectAttribute ( "webviewername" ; "content")

  • Author
the layout has 1 object   and its name in  inspector I NAME the object  WebServiceNavy
normally i don't name all objects
 
I am not familiar with, but inspecting Data ...   shows nothing in field name
 
the open webviewer shows the Navy clock data
using DEBUGGER varing the code syntax... fiddling/
I can't get $test data returned?
Anyone see something I am missing
 
TIA
 

post-85391-0-16234800-1355721552_thumb.j

  • Author

Okay I got it... done.. play play I will attach a zip. if anyone interested... my way in much longer.. parsing I certainly could have been written niftier/shorter lines etc....this first try.. but it does work, goes out and get a webpage, pase it to anything or now compare  run time to rent time

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.