Brian Dunning's FileMaker Custom Functions

ConvertExecuteSQLDateAU ( text )

Converts Dates returned by the ExecuteSQL function from YYYY-MM-DD to DD/MM/YYYY

  Average rating: 4.5 (24 votes) Log in to vote

Andrew Duncan   Andrew Duncan - Show more from this author
Databuzz
https://www.databuzz.com.au

Share on Facebook Share on Twitter

  Sample input:
ConvertExecuteSQLDateAU ( "2015-01-30" )
  Sample output:
30/01/2015

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Converts Dates returned by the ExecuteSQL function from YYYY-MM-DD to DD/MM/YYYY. ExecuteSQL accepts only the SQL-92 syntax ISO date and time formats with no braces. Dates are returned as text strings in this format:

YYYY-MM-DD

 

Comments

comment   comment, VR
Jun 1, 2015
This is assuming that the date format in use is d/m/y.

In order to make the calculation indpendent of any locale settings, use the Date() function instead, for example:

Let ( [
ymd = Substitute ( text ; "-" ; ¶ ) ;
year = GetValue ( ymd ; 1 ) ;
month = GetValue ( ymd ; 2 ) ;
day = GetValue ( ymd ; 3 )
] ;
Date ( month ; day ; year )
)
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.