Please note attached file. I need the date format to show as dd/mmm/yyyy at the moment the default is mm/dd/yyyy.
Can I add to the script to change this.
You can make it "text":
Month(ForwardDate) & "/" & Day(ForwardDate) & "/" & Year(ForwardDate)
This is where a custom function may be handy, so that you just pass any date field and get the text back.
Also keep in mind that this is not "padded". If you want MM/DD/YYYY and not M/D/YYYY, then you need to do this:
Right("00" & Month(ForwardDate); 2) & "/" & Right("00" & Day(ForwardDate); 2) & "/" & Year(ForwardDate)
Something like this custom function?
(if you do not have FMPA, you can just use the calculation 'as is', but supply the actual values)
or simply set it up in the inspector.
except it was IN a calculation (which does not respect the Inspector settings)...
If you need to calculate things based on the date value, the simplest way to display the date you want is to use the Inspector to format it any custom way you want on the layout. That way, your date values retain the field type "Date" and you can calculate upon them. The same is true for timestamp values.
If you're using ExecuteSQL a lot, you may want to consider making your own universal date-time format that typically looks like YYYYMMDDHHMMSS because that's what you will find in software such as UPS WorldShip, FedExShip Manager, just to name two commonly used, popular examples. But then the field should be a text field.
If you look at the OP's attachment, the calculation is a text field with many things, not just a date.
Thanks beverly, this worked beautifully. There is no field it is part of an "Insert merge field"
right! I meant a TEXT calculation result with a "date" as part of the calculation. I'm glad it worked. I found a few other custom functions for converting dates to particular 'text' formats. This one seems more complete and uses the same format characters as the php date function:
FileMaker Custom Functions | Displaying Function php.date
PHP: date - Manual
p.s. there are several "ideas" on this forum for improved date/timestamp formatting (& conversion):
* Add the international format yyyy-mm-dd to the Inspector
* Please ... Only One Timestamp Format!
Retrieving data ...