We have a requirement where the date-time should appear in MM/DD/YYYY HH:MM:SS (24 hr) format in the UltraWinGrid in a bound coulmn of data type DateTime.
eg. 05/21/2008 23:45:00
We have tried with the given formats and Styles.
Trying to modify some of the existing formats (tried with {LOC}mm/dd/yyyy hh:mm:ss and mm/dd/yyyy hh:mm:ss) gave some unexpected results, the entered time (23:45:00) got changed to 11:45:00 (AM/PM format but did not display "PM").
Thanks in advance.
Hi, Thanks for the feedback but I still can't get this working. It seems that the masks/ formats are separate for the fields 'FormatString' and 'Mask Input' i.e. I can't simply copy the mask into both fields as one is interpreted differently. I can get it looking fine when the date picker doesn't have scope by using Microsoft’s recommended formatting. However, when I click in the control it displays the value of the mask entered not the time.
I currently have the format string set to yyyy'-'MM'-'dd HH':'mm':'ss'Z' and correctly displays time as 2008-01-20 14:02:00
Could you please tell what needs to go in the input mask field to ensure a match with and without scope?
Thanks in advance,
Alex
Hi Alex,
A format and a mask are indeed two totally different (albeit related) concepts. But I don't know if it's possible to get them to match exactly. They do different things.
Formatting, as a general rule, is a much simpler process. It's one way. You take a value and you format it for display to the user.
Masks are much more complicated because they have to limit and interpret input by the user and convert that into a value of the appropriate type. So you need to look at the documentation for the MaskInput and see what kind of mask you want to use. I would think the mask would be very similar, but I'm not sure off the top of my head how you specify that the mask should show 24-hour time.
I also have this problem. Is the functionality to display consistently the date time format as 'MM/dd/yyyy HH:mm:ss' with or without focus not supported by Infragistics?
Hi,
I managed to get this sorted by setting the MaskInput to '{date} {longtime}'
Hope this helps!
Hi Mike,
I have a problem when UltraGrid NOT in Edit Mode, my date time display as a number.
Example: I have inputed 01/31/2012, but NOT in Edit Mode, it displayed 01312012.
What did I wrong? Please help, thanks.