Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5794 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Try something like:


Date ( 

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

MiddleWords ( ImportedDate ; 2 ; 1 ) ; 

MiddleWords ( ImportedDate ; 4 ; 1 ) 

)

Posted (edited)

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
Posted (edited)

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

This topic is 5794 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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