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.

DATEFORMAT error when exporting

Featured Replies

  • Newbies

I am using the simple_table XSLT stylesheet to generate a report.

Here is the problem

This is a sample of the XML:

<?xml version="1.0" encoding="UTF-8" ?>0

And, here is a sample of the XSLT:

?xml version="1.0" encoding="UTF-8"?>

xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp">

******** etc*****************************

Then*****************

Staff Report (by Allocations of QI Funds):)

I am expecting this as my title - Staff Report (by Allocations of QI Funds) 10/17/2006,

instead I get Staff Report (by Allocations of QI Funds) 'M/d/yyyy'

Any ideas? I need to get the date and even the Time on the report.

Thanks

I am no expert on XSLT, but it seems to me you are asking for the date FORMAT (an attribute of the DATABASE element), and that is exactly what you're getting.

I believe that in order to get actual date/time, you will need to place them in a field and include that field in your export.

  • Author
  • Newbies

Thanks for the reply...

I understand that the following, that is, NAME, RECORDS, DATEFORMAT, LAYOUT, and TIMEFORMAT, are attributes of the DATABASE element.

My question is, how can I populate the DATEFORMAT and TIMEFORMAT attributes???

It doesn't work like that, I'm afraid. An XSLT stylesheet does not populate anything. It transforms existing data. If the data is not there (in the XML source), the stylesheet will not create it for you. The DATEFORMAT attribute is not data; all it says is how a date needs to be interpreted - IF there is a date in the document (and FileMaker itself cheerfully ignores it when importing - but that's another story...).

Just to add to what Comment said, there will not be any date-of-export or other date/timestamp in the xml that Filemaker produces. You will have to specifically export a field with the date in it and then process that with your xslt.

This would be possible with XSLT 2.0 - but it seems that even FMP 8.5 is still using XSLT 1.0.

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.