Page 1 of 1

Date conversions

Posted: Wed Jan 02, 2008 8:17 am
by iamnagus
How Many types of syntaxes available for date conversions in MODIFY stage.

can any one brief about this

Posted: Wed Jan 02, 2008 4:59 pm
by ray.wurlod
Lots. See Orchestrate Operators manual, particularly the chapter on the modify operator. Here are the main ones:
date_from_days_since[date](int32)
date_from_julian_day(int32)
date_from_string[date_format](string)
date_from_ustring[date_format](ustring)
month_day_from_date(date)
weekday_from_date[origin_day](date)
year_day_from_date(date)
days_since_from_date[source_date](date)
julian_day_from_date(date)
month_from_date(date)
next_weekday_from_date[weekday](date)
previous_weekday_from_date[weekday](date)
string_from_date[date_format](date)
ustring_from_date[date_format](date)
year_from_date(date)
year_week_from_date(date)

Posted: Fri Jun 27, 2008 6:06 pm
by leomauer
I am having very hard time with modify:
ray.wurlod wrote:Lots. See Orchestrate Operators manual, ustring_from_date[date_format](date)
Tried
L_MOD_DATE:Date = date_from_ustring "%yyyy-%mm-%dd" (L_MOD_DATE)

Got runtime abort with message:
main_program: Error parsing modify adapter: Expected ';' or end, got: ""%yyyy-%mm-%dd""
Expected destination field selector, got: ")"; input:
L_MOD_DATE:Date = date_from_ustring "%mm-%dd-%yyyy" (L_MOD_DATE)
;
I have no idea how else the call may look like.
Please help.

Posted: Fri Jun 27, 2008 6:49 pm
by leomauer
Got it finally. It is actually with squre brckets
L_MOD_DATE:Date = date_from_ustring ["%mm-%dd-%yyyy"] (L_MOD_DATE)

Usually squre brckets used to denote optional parameters, here it is both.
The date format is either optional (with default format yyyy-mm-dd) or actully in square brackets.

Re: Date conversions

Posted: Sat Jun 28, 2008 12:16 am
by sreddy
Hi


Go through this like you can found many date conversions.




http://mike2.openmethodology.org/wiki/A ... ming_Guide


iamnagus wrote:How Many types of syntaxes available for date conversions in MODIFY stage.

can any one brief about this