Skip 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.

Converting a Date

Featured Replies

Through a web form FileMaker receives a text like this:

Friday, 6 March, 2009

How to convert this into a FileMaker compatible date field like this: 3/6/2009?

I am stuck with it and don't know what to do. Is there an easy method or complicated calculation available?

Any help would be great.

Cheers

Greg

Try something like:


Date ( 

Ceiling ( Position ( "janfebmaraprmayjunjulaugsepoctnovdec" ; Left ( MiddleWords ( ImportedDate ; 3 ; 1 ) ; 3 ) ; 1 ; 1 ) / 3 ) ; 

MiddleWords ( ImportedDate ; 2 ; 1 ) ; 

MiddleWords ( ImportedDate ; 4 ; 1 ) 

)

  • Author

Thanks, found a solution:

http://www.briandunning.com/cf/852

Custom Function:

GetTextAsDate (dateTxt; formatTxt)

... which I hopefully get to work!

Cheers

Edited by Guest

Holy Mule! Why use a long convoluted custom function when a clean, simple, tiny calculation will do it?

  • Author

If I only would be able to get the 'clean, simple, tiny calculation' get to work. Do you have a solution?

Cheers

Greg

What was wrong with Comment's calculation?

  • Author

Perfect now. It did not work because I changed the format of the imported date.

Great sample, thanks a lot!

Greg

Well now, I liked that, Michael. I've used similar calcs to find the position of the short months but I've always used 1+Position(etc... ). But adding 1 is sloppy because it just changes 1.3333333333 to 2.3333333333 after divided by 3.

Your method of using Ceiling precisely rounds up to 2; no trailing .333333's. It's a good reminder ... I don't think I take advantage of Ceiling() often enough.

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.