Jump to content
Sign in to follow this  
Corys8646

Reformat Date Field

Recommended Posts

hello, I have what I hope is an easy question.

I have a file I am importing with a date formated: Nov 20, 2007, modifying the source is not an option unfortunately.

Problem is, Filemaker is not seeing that as a date, so I am not able to do searches based on date.

Is there a calculation field I can create that will format my source field into a date that filemaker will recognize? or is there a better way of doing this?

thanks in advanced!

Share this post


Link to post
Share on other sites

It's not pretty, but here:

Substitute ( yourField ;

[ "Jan" ; 1 ] ;

[ "Feb" ; 2 ] ;

[ "Mar" ; 3 ] ;

[ "Apr" ; 4 ] ;

[ "May" ; 5 ] ;

[ "Jun" ; 6 ] ;

[ "Jul" ; 7 ] ;

[ "Aug" ; 8 ] ;

[ "Sep" ; 9 ] ;

[ "Oct" ; 10 ] ;

[ "Nov" ; 11 ] ;

[ "Dec" ; 12 ] ;

[ " " ; "/" ] )

Share this post


Link to post
Share on other sites

You will also want to remove the comma so add another line to your substitute calc...

[ "," ; "" ]

Share this post


Link to post
Share on other sites

How about this one.

Date((Position("JanFebMarAprMayJunJulAugSepOctNovDec", LeftWords(Yourdate, 1), 1, 1) + 2) / 3, MiddleWords(Yourdate, 2, 1), RightWords(Yourdate, 1))

HTH

Lee

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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