December 11, 200421 yr Newbies Help! this is driving me nuts... I wish to display dates in dd/mm/yyyy format using custom web publishing. At present it refuses to do anything other than mm/dd/yyyy. (It displays correctly when viewing the database in Instant Web Publishing, and also when exporting the xml directly from FileMaker) I can see that the xml that is being sent to the cwp engine has "date-format="MM/dd/yyyy" " in the 'datasource' tag (see below), but no idea how to change it. Does anybody know??? ----------------------------- http://intraweb-dev/fmi/xml/fmresultset.xml?-db=Goods_In&-lay=Plain&-findall <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE fmresultset PUBLIC "-//FMI//DTD fmresultset//EN" "/fmi/xml/fmresultset.dtd"> <fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0"> <error code="0"></error> <product build="08/12/2004" name="FileMaker Web Publishing Engine" version="7.0v3"/> <datasource database="Goods_In" date-format="MM/dd/yyyy" layout="Plain" table="Goods_In" time-format="HH:mm:ss" timestamp-format="MM/dd/yyyy HH:mm:ss" total-count="1261"/> <metadata> <field-definition auto-enter="yes" global="no" max-repeat="1" name="DateEntered" not-empty="no" result="date" type="normal"/> ... ------------------------
December 11, 200421 yr You may have to change it when you "process" it. Be it with XSLT or PHP, etc :-( All the best. Garry
December 11, 200421 yr Caveat: I'm happily using Pro 5.0x You may find it useful to use unstored calcs as text (not date). One can arrange date functions to the desired order, etc. thru calcs. Enter the data into the field that works with the transmission. Convert thru a calc and display thru a calc on the results page.
December 12, 200421 yr You can use the fmxslt:convert_datetime(String oldFormat, String newFormat, String date) extension function (FMS7A Custom Web Publishing Guide, p. 68). E.g. xsl:value-of select="fmxslt:convert_datetime('MM/dd/yyyy','yyyy-MM-dd',XPath_to_your_date_field)"/> I had to remove the < before xsl, otherwise the code is not shown. Martin
December 15, 200421 yr Author Newbies Thanks all, I was really trying to avoid having to roll my own... but it looks like I'll have to. The display part isn't difficult, but I'm not looking forward to the entering dates part. 12 databases, numerous date fields...
Create an account or sign in to comment