You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Offline
you can use this routine
public static String getDaysOfWeek(java.util.Date myDate) {
String theDay="";
String [] allDays = {"","SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY"};
java.util.Calendar cal1 = java.util.Calendar.getInstance();
cal1.setTime(myDate);
theDay=allDays[cal1.get(java.util.Calendar.DAY_OF_WEEK)];
return theDay;
}
Offline
you can create a routine in Repository>Code>Routine for exemple MyRoutine and copy/paste
public static String getDaysOfWeek(java.util.Date myDate) {
String theDay="";
String [] allDays = {"","SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY"};
java.util.Calendar cal1 = java.util.Calendar.getInstance();
cal1.setTime(myDate);
theDay=allDays[cal1.get(java.util.Calendar.DAY_OF_WEEK)];
return theDay;
}
in place of
public static void helloExample(String message) {
if (message == null) {
message = "World";
}
System.out.println("Hello " + message + " !");
}
In your tMap
you can use it in a field using MyRoutine.getDaysOfWeek(row1.mydate)
Offline

Thanks!
Work like a charm,
I guess the same thing goes for month?
public static String getMonth(java.util.Date myDate) {
String theMonth="";
String [] allMonths = {"","JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY", "AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"};
java.util.Calendar cal1 = java.util.Calendar.getInstance();
cal1.setTime(myDate);
theMonth=allMonths[cal1.get(java.util.Calendar.MONTH_OF_THE_YEAR)];
return theMonth;
}
Last edited by ead (2008-11-10 10:20:03)
Offline
Pages: 1