on 08-03-2006 12:02 PM
Hi
<u><b>Scenario:</b></u>
I have a table that has date, time and string data columns.
I have a search field where the user can enter any string and find a match.
<u><b>Problem:</b></u>
Format of Date displayed in the table: "5/9/2006"
Search String entered by the user: "5/9/2006"
Format of the Date when I use messageManager.reportSuccess to display the
date from the same context attribute: "2006-05-09"
Because of this difference, Im not able to find a match.
<u><b>Limitations:</b></u>
Cannot use SimpleDateFormatter as the format might differ for different countries.
<u><b>Question:</b></u>
How can I solve this problem?
Thanks
oj
Hi,
You can use SimpleDateFormat, because it takes a Locale as one of the parameters to its constructor.
SimpleDateFormat f = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
f.parse("<your date value>");
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oj,
post your code to execute search.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.