on 10-10-2007 1:23 PM
hI,
How to get yesturday date? in Message mapping. wht function should I use?
regards,
Ansar.
Hello ,
Use this code....
import java.text.*;
import java.util.*;
public class DateTest {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
DateFormat fmt = DateFormat.getDateInstance();
for(int i=0; i<30; ++i) {
c.add(Calendar.DAY_OF_MONTH, -1); //back one
System.out.println(fmt.format(c.getTime()));
}
}
}
With Regards,
Sagar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just use this UDF without any input parameter
//write your code here
Calendar today = Calendar.getInstance();
today.add(Calendar.DATE, -1);
java.sql.Date yesterday = new java.sql.Date(today.getTimeInMillis());
return yesterday.toString();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Use the currentDate function from Dates in UDF, then you can write a small UDF to get the previous date based on the value.
regards
Sameer
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 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.