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.

Import into european date format

Featured Replies

Hi

I am having some dificulties in importing data from a txt file. In this txt file the date is in american format mm/dd/yyyy, while I want to import into a date field in european date format dd/mm/yyyy.

I am not succeding in doing this.

Any idea?

Edited by Guest

In version 6?

I am having some dificulties in importing data from a txt file. In this txt file the date is in american format mm/dd/yyyy, while I want to import into a date field in european date format dd/mm/yyyy.

Import the mm/dd/yyyy data into a text field. Use a Replace field Contents with a calculation to put the date into the real date field.

In the calculation, break up the text into the three pieces and put them back together with the Date() function.

Edited by Guest

  • Author

I managed to do it. The problem was not only the format but sometimes the content of the field itself. In the text file the date was without the leading zeros for example:

4/10/2009 or 11/6/2009

So i used the following calculation:

Date ( GetAsText (Left (Date; Position (Date;"/";1;1))); GetAsText (Middle(Date;(Position (Date;"/";1;1));(Position(Date;"/";4;1))-(Position (Date;"/";1;1)))); GetAsText (Right (Date;4)))

Thank you for your replies, Toni

In the text file the date was without the leading zeros for example:

4/10/2009 or 11/6/2009

So i used the following calculation:

Date ( GetAsText (Left (Date; Position (Date;"/";1;1))); GetAsText (Middle(Date;(Position (Date;"/";1;1));(Position(Date;"/";4;1))-(Position (Date;"/";1;1)))); GetAsText (Right (Date;4)))

That type of text handling is suitable for FileMaker version 5 and later (with function names and syntax changed as needed), but it can be simplified in the later versions of FileMaker.

You can now use:

Date(LeftWords(Date; 1); MiddleWords(Date; 2; 1); RightWords(Date; 1))

Edited by Guest

  • Author

Hmm, very good point TheTominator

Thank you for that

Here is a Let calculation that was posted by Bob Weaver a while back,

Let([

Parts=Substitute(DateField;"/";" ");

Month=LeftWords(Parts;1);

Day=MiddleWords(Parts;2;1);

Year=RightWords(Parts;1)];

Day &"/"& Month &"/"& Year)

HTH

Lee

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.