Time Format
Permalink Browser Info Environment
I have created a form with a Date and Time field The Time field on the page builds in the colon to separate hours and minutes. However when using the field in the Data Display, I have to use:
<field name="Time" />
which produces something on the order of 11 10 PM, colon missing.
I see a few possible solutions, looking for the right one:
- Access individual pieces of the item, ie: <field name="Alert Time(1)" /> or <field name="Alert Time"(1) />;
- Have an attribute that accesses the index of the field, ie: index of sorts ie:<field name="Alert Time" index=0 /> : <field name="Alert Time" index=1 />, etc.
- An attribute that specifies the time type, ie:
<field name="Alert Time" type="time" />
What is the solution??
Thanks!
<field name="Time" />
which produces something on the order of 11 10 PM, colon missing.
I see a few possible solutions, looking for the right one:
- Access individual pieces of the item, ie: <field name="Alert Time(1)" /> or <field name="Alert Time"(1) />;
- Have an attribute that accesses the index of the field, ie: index of sorts ie:<field name="Alert Time" index=0 /> : <field name="Alert Time" index=1 />, etc.
- An attribute that specifies the time type, ie:
<field name="Alert Time" type="time" />
What is the solution??
Thanks!
Type: | Discussion |
---|---|
Status: | New |
Thanks! I was just on that route to that solution, noticing the time formatting for timestamp.
Here's the next problem, however:
Two different entries:
2011-04-14 9: PM
2011-03-29 11:10 PM
Double checking the record, I noticed that the minute field was not selected. Strangely I remember selecting 00. So I set it again, and it didn't save, as if 0 is invalid for time minutes. Ever see that?
Here's the next problem, however:
Two different entries:
2011-04-14 9: PM
2011-03-29 11:10 PM
Double checking the record, I noticed that the minute field was not selected. Strangely I remember selecting 00. So I set it again, and it didn't save, as if 0 is invalid for time minutes. Ever see that?
Follow up:
Now for whatever reason, I am seeing a good display of 9:00 PM on the one entry, but still when I go in to edit the entry, the default for the field is 9, <blank>, PM. As if the default for the dropdown select is not reading the database correctly. That's more of an FYI, as once it's submitted, all is good. Exporting the data racords produce a good .csv file.
Thanks for the help!
Now for whatever reason, I am seeing a good display of 9:00 PM on the one entry, but still when I go in to edit the entry, the default for the field is 9, <blank>, PM. As if the default for the dropdown select is not reading the database correctly. That's more of an FYI, as once it's submitted, all is good. Exporting the data racords produce a good .csv file.
Thanks for the help!
That's strange, I haven't seen that, but I haven't ever really used the Time field - luckily Justin is very good with support, so I'll defer to him on this one.
Hursey is correct about the format="time" (obviously, since that worked for you!). Regarding "00" minutes showing up as blank when editing, I am able to replicate that, so let me take a look and see if I can figure out what's causing that.
Okay, I've got the bug fixed. Let me try to take care of a couple of other minor bugs, then I'll get the new version posted.
Great, thanks!
FWIW: The issue I was having that I sent you a PM on, regarding seemingly no records were being created, obviously somehow was fixed. Might have been because I had the dropdown defaulting to blank, but didn't have a blank line at the beginning of the entry list.
FWIW: The issue I was having that I sent you a PM on, regarding seemingly no records were being created, obviously somehow was fixed. Might have been because I had the dropdown defaulting to blank, but didn't have a blank line at the beginning of the entry list.
Oh haha...I just responded to it, so I guess you can ignore that. :) Glad it's working for you now.
Ya I just saw that, thanks! Yeah I entered in fields one at a time until the last one I got to was the pull down. So maybe that's also just a word to the wise.
Thanks again! Client loves what we gave them!
Thanks again! Client loves what we gave them!
The new version (1.4.1) has been posted (this bug affected Advanced Forms, not Data Display).
Hasn't quite made it in to the documentation yet, but that should do the trick.