Skip to main content
Question

Day and month being swapped in date field on ""?a=API_GenAddRecordForm


I'm using "?a=API_GenAddRecordForm" & "&_fid_41=" & [Date I want] & "&_fid_42=" ...

Field 41 and 'Date I want' are both date fields.
In app properties, formatting of dates is DD-MM-YYYY (I live in Australia).
When the form opens, in field 41, the day is in the month and month is in day from the 'Date I want'.

Thank you.
This topic has been closed for replies.

Forum|alt.badge.img+14
You probably need to write a variable that will format the Date into Australia format using the function ToFormattedText([Date Field],"DDMMYYYY).  Then "encode" the variable in your API call.

ToFormattedText (Date d, Text f)

Description: Returns a Text value containing the formatted print representation of the Date d, using the format f.

Example: ToFormattedText(Date(2000,01,30),"MMDDYYYY")  returns "01-30-2000"
ToFormattedText(Date(2000,01,30),"MMDDYY")  returns "01-30-00"
ToFormattedText(Date(2000,01,30),"DDMMYYYY")  returns "30-01-2000"
ToFormattedText(Date(2000,01,30),"DDMMYY")  returns "30-01-00"
ToFormattedText(Date(2000,01,30),"YYYYMMDD")  returns "2000-01-30

  • Author
  • Registered
  • June 26, 2018
Thanks I'm sure this will solve it. Seems strange and was a bit concerning that this would happen.