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 5553 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have some data imported which has the date formatted so FMP apparently can't recognize it.

The dates are three letter months, space, two digit date, comma, space 4 digit year: Like This-> Oct 20, 2009

I tried reformatting with the Format Date but it gives me a question mark. I also tried a "getAsDate" calculation which didn't work either. Ideas??

Thanks Much

Posted (edited)

I'm unsure what you now have in the field. If it is a date field [color:green](or a text field) which was imported with improper date as you indicated (and you haven't changed the format in an attempt to repair it), then you can use this calculation:

Let ( [

m = Int ( 1 + Position ( "JanFebMarAprMayJunJulAugSepOctNovDec" ; Left ( textDate ; 3 ) ; 1 ; 1 ) / 3 ) ;

d = MiddleWords ( textDate ; 2 ; 1 ) ;

y = Right ( textDate ; 4 )

] ;

Date ( m ; d ; y )

)

Before you use a Loop and Set Field (or Replace Field Contents) to repair the field, back up first and you might also create a calculation (result is date) with this and view your results so you won't have any surprises. :smile2:

UPDATE: This calc will work whether your field is date format or text. But it, of course, should be a date field. You can then display the date any way you wish using layout-level date formatting ( Format > Date ).

Edited by Guest
Added update & green

This topic is 5553 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.