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.

Decoding a PHP strftime to use in Filemaker

Featured Replies

  • Newbies

Hi there,

My problem is I have an office booking system that is built with PHP and uses MySQL as the database.

I am trying to use the data stored in the MySQL database with Filemaker, however, the date and time in the MySQL database is stored in the following format: "1247700600" (An integer)

I had a bit of a look around in the PHP files and seems to have found something that I think codes that date and time into something called strftime.

Does anyone know a custom function in Filemaker or any other way that would decode this back into a readable format for use in Filemaker.

Any help would be much appreciated.

That integer is most likely a unix timestamp (i.e. the number of seconds since midnight Jan 1st 1970). Use the following in your Select statement for import, or create a view with the following field added to the table to add to your relationship graph.


mysql>

 select FROM_UNIXTIME(1247700600) as myDate;

+---------------------+

| myDate              |

+---------------------+

| 2009-07-15 16:30:00 | 

+---------------------+

1 row in set (0.00 sec)





Filemaker will interpret the MySQL date as a FM Date type.

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.