Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Change date format in filemaker pro

Posted on 2010-08-25
Medium Priority
Last Modified: 2012-05-10
I need to make a script that turns the following date format    2010-08-20    to      8/20/2010
Question by:techpr0
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 12

Accepted Solution

North2Alaska earned 2000 total points
ID: 33523149
I'm assuming that the date formatted as 2010-08-20 is a string and not a date.  But that you want to convert it to a date.

I would do something like the below.  Then stored as a date you can format it any way you want.
// where str is "2010-08-02" and that 08 is the month
Date ( Middle ( str; 6; 2 ) ; Middle ( str; 9; 2 )  ; Middle ( str; 1; 4) )

Open in new window


Author Comment

ID: 33523252
The date formated as 2010-08-20 is a date field but shows as a ? when field not selected because of this formating.  The records are filled from an import script. I don't have access to change the data prior to going in filemaker.

All records in this field will be need to be changed to the correct formating regardless of date so how do i handle the selection of the field.

Will this solution still work based on this info?
LVL 12

Expert Comment

ID: 33523579
OK, the ?? shows in the field because FM doesn't think it is a date.  So, you have a script that does the import right?  When the import is complete it should have a "Selection" (a found set) of records and you can run this piece of code on that selection.  Just set field script step to the code above, but replace "str" with the name of the field.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 33523721
it's formating the date correctly but only one record even though i am doing it right after the import. How do i get it to do it on all records  for the given field?

I am using the following to get the correct date as you stated.
Set Field[DateField;Date (Middle ( DateField; 6; 2)  ; Middle ( DateField; 9; 2) ; Middle ( DateField; 1; 4))
LVL 12

Expert Comment

ID: 33523951
You could use the "Replace Field Contents" script step or simply loop through the current found set.

Author Comment

ID: 33524048
Worked. Thanks.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question