0

I am working on FileMaker Solution that need to connect web browser via PHP

I have date field need to be filled from browser , i use data format "dd/mm/yy". but when i try to submit this format it fails via web. and it shows error message Error 500, means validation failed.

after i digging i found filemaker's default date format is "mm/dd/yy" , i tried it and it works , but i need to user to be able to enter dd/mm/yy via date picker ,

any help appreciate:) thank you for your time

user3214631
  • 43
  • 1
  • 5
  • see http://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format, or do a search by "datepicker format" – Carlos Campderrós May 20 '14 at 14:11
  • Hello Carlos, I checked the link you suggested be, however, it seems not what i looking, Thank you any way.my problem with posting date back to filemaker – user3214631 May 20 '14 at 14:34
  • What are you asking here? I'm not understanding the question. Are you just asking how to convert date formats? – gen_Eric May 20 '14 at 16:04
  • I have PHP page that is connected to Filemaker database, i need to post date/month/year format to database via php web page to filemaker database.But it does not let me post it because it says date validate is failed from database side. if i post Month/day/Year format from php it submits without falling.Which means to me filemaker'sdefault date format does accept US date system, but not EU format, So what i am trying to achieve is even if filemaker isacceptable the US format, my users should be able to submit EU date format via web browser and it will save in database like US format. – user3214631 May 23 '14 at 07:45

1 Answers1

0

The following should work for you if you are entering in a form field as DD/MM/YYYY:

$date_array = explode ( "/", $_POST['yourDateInputFormField']);
$fm_date = $date_array[1]."/".$date_array[0]."/".$date_array[2];
$request->setField('YourFileMakerDateField', $fm_date); 
user982124
  • 4,416
  • 16
  • 65
  • 140