Newbies Phil G Posted December 11, 2004 Newbies Posted December 11, 2004 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"/> ... ------------------------
Garry Claridge Posted December 11, 2004 Posted December 11, 2004 You may have to change it when you "process" it. Be it with XSLT or PHP, etc :-( All the best. Garry
Unable Posted December 11, 2004 Posted December 11, 2004 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.
Martin Brändle Posted December 12, 2004 Posted December 12, 2004 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
Newbies Phil G Posted December 15, 2004 Author Newbies Posted December 15, 2004 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...
Recommended Posts
This topic is 7275 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now