on 12-09-2008 2:02 PM
Hi masters!
I have an input field for a Time attribute but this input field is displayed with this mask: 1:01:00.
So what should I do to change this mask to 01:01 ?
You could create a custom DDIC type based on "time" and assign your wanted format to it.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this code it will do the work for you.
My context attribute is of type "time" and it is binded to the input field.
Format formatter = new SimpleDateFormat("h:mm");
String newtim =formatter.format(wdContext.currentContextElement().getTime());
wdComponentAPI.getMessageManager().reportSuccess(""+newtim);
Result:-
11:30:00--->before
11:30---->After
Note:-
If you want AM or PM Change the first line code as follows.
Format formatter = new SimpleDateFormat("h:mm a");
Thanks & Regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.