I created a TV named [+eventDate+] with "date" as the input type..its showing up as mm-dd-yyyy 6:03:00.. How do I remove "6:03:00 and change mm-dd-yyyy to mm.dd.yy?
Use
[+eventDate:date=`%m.%d.%y`+]
+
Quote from: kp52 at Sep 20, 2009, 02:52 PM
...set the Unixtime widget for your date
//Ditto Tpl’s have PHx built in.
There is at least 4 options here:
in
Ditto Tpl
- Use [+date+] + &dateSource=`myTV` + &dateFormat=`%m.%d.%y`
- Use [+myTV:phx...+]
in
Resource/Template/Chunk
- Use
snippet
- Install PHx plugin and use [*myTV:phx...*]
- If you use [*date*] in template/resource content - then you must create a TV named "date".
[*TvTag*] [*DocumentObjectTag*] ...But why do that when Ditto uses this?
- If you use [+date+] in ditto tpl - then you need to set this in the [[snippet call]]
Quote from: ditto.modxcms.comdateSource Source of the [+date+] placeholder
dateFormat Format the [+date+] placeholder in human readable form
[+SnippetPlaceholder+]
I use [+date+] in tpl and &dateSource=`pub_date` which is a default
Document Object
storing the unixtime for when my article was published. Then on the template I use [*pub_date:date=`...`*] Because I have
PHx plugin installed.
If I don’t want to use PHx I could use a snippet
http://modxcms.com/forums/index.php/topic,39848.msg240859.html#msg240859