Hi Sree-
I am not sure, we have BIS to convert date values to julian date format…
Why you cant try with java services?
1. Create java service with input “date”, “year”, “month” and output “juliandate” - all input, outputs are string.
2. Once specified the input and output go → Tools–> Generate Code.
3. and paste your clipboard content to editor…
4. Modify the code like this…
Java Service Name : convertDateToJulianDate
/**********************************************************************************************
Convert date values to Julian Date.
Julian Date is 5 digit number, consisting of a 2 digit year and a 3 digit day-of-year number.
For example, 24-August-1999 is stored as 99236, since 24-August is the 236th day of the year.
Pass input Example: date : 29, year: 07 (Ex:last two digit of year), month: 05
**********************************************************************************************/
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String l_str_date = IDataUtil.getString( pipelineCursor, “date” );
String l_str_year= IDataUtil.getString( pipelineCursor, “year” ); //Pass only 2 digit of year to me…
String l_str_month = IDataUtil.getString( pipelineCursor, “month” );
pipelineCursor.destroy();
// giving some work to JVM… - Find day of year
int l_int_date = Integer.parseInt(l_str_date);
int l_int_year = Integer.parseInt(l_str_year);
int l_int_month = Integer.parseInt(l_str_month);
Calendar l_cal_obj = Calendar.getInstance();
l_cal_obj.set(l_int_year,l_int_month,l_int_date); //year, month, date
int l_int_dayofyear = l_cal_obj.get(Calendar.DAY_OF_YEAR); // i am a day of year…
String l_str_julianDate = l_str_year + String.valueOf(l_int_dayofyear); //i am a julianDate…
String l_str_obj_julian = new String(l_str_julianDate);
// pipeline - Assign final output to service output…
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, “juliandate”, l_str_obj_julian);
pipelineCursor_1.destroy();
5. now you can invoke this java services from any flow services and get your expected result… and run with some examples…
date : 29, year: 07 (Ex:last two digit of year), month: 05-- It will give output like “07180”
Hope this Helps!
Thanks!
ArulChristhuRaj
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods