on 01-03-2012 1:22 PM
Hi,
How to set default value to date type attribute.
E.g I want to set u201C01/01/1999u201D to date attributes.
First i want to set value and then i want to fetch the same & want to check equals.
please suggest solution.
Regards,
Smita
Hi,
In wdinit() method u can set the date
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
Date today = Calendar.getInstance().getTime();
String reportDate = df.format(today);
wdContext.currentContextElement().setFromDate(reportDate);
Another way you have set the this formate like that
1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
2. Select the type as "date"
3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
4.Bind the context attribute to the type created now.
Hope this helps u.
Best Regards
Vijay K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.