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 to format Time inputs from PHP?

Featured Replies

  • Newbies

I'm having a lot of trouble figuring out how I should be formatting a Time for input into a field. How should I do this? I was able to input a date by taking a date with the format MM-DD-YYYY and putting it through date() and setting a date field to that, but I can not for the life of me get time to work. I'm working from a form, so I can format the initial input to the page however I'd like, and just need to know how I can get FileMaker to accept it for a time field.

Thanks all

I believe FileMaker wants the format HH:mm:ss

So assuming an hour (24 hour) and minute field on the form

$hour = $_REQUEST['hour'];
$minute = $_REQUEST['minute'];
$input = $hour .":".$minute.":00";

Dates are natively mm/dd/yyyy so just formatting the form input to that should work.

 

You should also be able to set your field using the Time(hh; mm; ss) command:

$enterTime = $foundRecord->setField(;yourTimeField', "Time(" . $hour . "; " . $minute . "; 00)";

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.