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.

Featured Replies

A date field in my database is formatted as 2015-03-01 in the layout mode. When exporting to a csv the date is written 01/03/2015. Why and how do I change it?

Why and how do I change it?

 

Why:

The most likely reason is that your field actually contains "01/03/2015". And that your file is set to use dd/mm/yyyy as the date format.

 

How do I change it?

That depends. If you're happy with how the file behaves in terms of entering/searching for/displaying dates, and all you want is to fix the exported file, then turn on the 'Apply current layout's data formatting to exported data' option when setting up the export.

  • Author

Why:

The most likely reason is that your field actually contains "01/03/2015". And that your file is set to use dd/mm/yyyy as the date format.

 

I guess you're right about that. dd/mm/yyyy is the default system setting in Danish.

 

How do I change it?

That depends. If you're happy with how the file behaves in terms of entering/searching for/displaying dates, and all you want is to fix the exported file, then turn on the 'Apply current layout's data formatting to exported data' option when setting up the export.

 

Hmmm, I'm exporting via a script. I cantt find this option in the dialog boxes. Can I (and how do I) add it as a line in the xsl-file?

I cantt find this option in the dialog boxes.

 

It's at the bottom of the 'Specify Field Order for Export' window.

 

Can I (and how do I) add it as a line in the xsl-file?

You didn't say this was an XML export. Yes, you can do the formatting in XSLT, if you prefer. Try something like:

<xsl:variable name="date" select="fmp:COL[3]/fmp:DATA"/>
<xsl:value-of select="substring-after(substring-after($date, '/'), '/')"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring-before(substring-after($date, '/'), '/')"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring-before($date, '/')"/>

Here, the date field being exported is the 3rd field in the export order.

  • Author

It's at the bottom of the 'Specify Field Order for Export' window.

 

Thank you very much, Consultant. Job's done! :hug:

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.