U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » LineEdit, EditFields, DocEdit » EditTime - how to change format?- [SOLVED]-EditField & Convert
Re: EditTime - Is it possible to change displayed format? [message #567 is a reply to message #565] Mon, 09 January 2006 20:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
::Format(Time(q))

- q is converted to Time and global Format(const Time&) is called.

However, this "standard" Format is a little but misleading in this case, as what you will really need is Format just for one type (Time). So it might more likely look like this:

Value MyTimeConvert::Format(const Value& q) const {
Time tm = q;
return ::Format("%d:%d:%d", tm.hour, tm.minute, tm.second);
}

Note that this Convert would crash (or fail the assert in debug mode) if Value non-convertible to Time is passed, but that is OK in this case (you are going to use it just for Time anyway).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Trouble with EditTime
Next Topic: DocEdit code scrolling
Goto Forum:
  


Current Time: Mon May 11 00:10:47 GMT+2 2026

Total time taken to generate the page: 0.00514 seconds