Help - Search - Members - Calendar
Full Version: Mt:date Vs. Custom Date Field
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
forstle
Why does this work:
CODE
<mt:SetVarBlock name="startdate">
<mt:Date format='%Y%m%d' />
</mt:SetVarBlock>


When I print startdate, I get: 20080525.

And this does not work:
CODE
<mt:SetVarBlock name="startdate">
<mt:EntryDataStartDate format='%Y%m%d' />
</mt:SetVarBlock>


When I print startdate, I get: June 6, 2008
(This is what the date is set to in the Entry I am working with).
OtherNiceMan
I have never heard of EntryDataStartDate, I can not find it in the tag list, is this from a plugin?

Does it support the format modifier?
forstle
I have a Custom Field defined as a Date and Time (only Show Date) named StartDate.

QUOTE (OtherNiceMan @ May 26 2008, 04:17 AM) *
I have never heard of EntryDataStartDate, I can not find it in the tag list, is this from a plugin?

Does it support the format modifier?

OtherNiceMan
What version of MT and CF are you using?
forstle
4.1 Professional Pack

QUOTE (OtherNiceMan @ May 26 2008, 10:31 AM) *
What version of MT and CF are you using?

OtherNiceMan
Looks like CF ignores the format attribute for date fields.
forstle
Yeah, that helps like--- no one! smile.gif

I hacked it to get it to do what I wanted it to do.

I am also disappointed that although gt and lt seem to work in mt:If, that gte and lte do not seem to function.

Sigh.

QUOTE (OtherNiceMan @ May 26 2008, 10:47 AM) *
Looks like CF ignores the format attribute for date fields.

forstle
For the record I would like to assert that there is no reason why CF date fields shouldn't honor format commands.

Just in case any SixApart developers happen across this thread... it doesn't make sense as format is just a modifier, it would imply to me that all CF fields do not honor the format modifier. ??
OtherNiceMan
QUOTE (forstle @ May 26 2008, 03:55 PM) *
For the record I would like to assert that there is no reason why CF date fields shouldn't honor format commands.

Just in case any SixApart developers happen across this thread... it doesn't make sense as format is just a modifier, it would imply to me that all CF fields do not honor the format modifier. ??



This forum is for community lead support so it might take a while for them to happen across this, what I would do is raise it as a Trouble Ticket under the typekey account used to purchase the Professional Pack.

Pass on what format modifiers CF do support.
forstle
Good plan. Under a deadline right now so the bug report and testing of other modifiers will have to wait.

QUOTE (OtherNiceMan @ May 26 2008, 11:32 AM) *
This forum is for community lead support so it might take a while for them to happen across this, what I would do is raise it as a Trouble Ticket under the typekey account used to purchase the Professional Pack.

Pass on what format modifiers CF do support.

OtherNiceMan
After having a chat with a few people.

As I understanding it CF does not store dates as dates, but as a string, which is why format does not work.

If you know PERL look in addons\Commercial.pack\lib\CustomFields\App\cms.pm around line 127
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.