Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How does data-format work?
mjs
How does <database data-format="..."> work if the data-type is "date"? The manual says that in this case, it should "contain a validation regex"--but I can't see how a regex can ensure that a date entered as, say "01/03/2003" gets interpreted (and written to the database) as if it were dd/mm/yyyy, and not mm/dd/yyyy.
Michael
Find more posts tagged with
Comments
kjackson
Michael,
I think it is referring to using a regex at the <item> rather than the <database>
Eg. <item name="Publication Date">
<description> date format is YYYY-MM-DD</description><database data-type="DATE" data-format="yyyy-mm-dd" />
<text required="t" maxlength="10" validation-regex="^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$" /></item>
Adam Stoller
If it's the validation-regex you want to do - check out
KB 45818
--fish
(Interwoven Senior Technical Consultant)
mjs
Thanks, kjackson and ghoti, for your replies.
I did figure out eventually that I was reading the manual wrong, and that it was basically saying "if you use data-format, you should use item's validation-regex"--but I still need to know what the valid formats for data-format are.
If an item is a date, and it's validated to (say) "2003-01-03", how does DataDeploy know this is yyyy-mm-dd and not yyyy-dd-mm? What if the date is validated to "Sat May 17 12:02:57"? Is there a list of possible data-format strings anywhere?
Adam Stoller
If you have the DataDeploy 5.6 manual - start reading around page 154.
--fish
(Interwoven Senior Technical Consultant)