Sorry I should have mentioned befoere my values is date+timestamp like :
2008-07-06 06:29:00.0
I think I need to conver into Date then time , in the following example I have used only one date , I assue if this work I can easily calculate difference by using minus - .
I don't know how ICONV function works?,
The following condition I have used in Stage Variable in Transformer
DataStage server doesn't have a date or a timestamp data type. If you do an Iconv() from a date using the correct mask ('D4-YMD' in this case) the result is an integer (the number of days since 31 DEC 1967). If you do an Iconv() from the time portion of the string using the mask 'HH:MM:SS' then you will received an integer number with the number of seconds since midnight.
Do you need the time component or do you just wish to use the date portion?
I think I will calculate the difference on Date only Not timestamp.
So do I have to convert into Date first as currently the type in the db2 is TIMESTAMP and the difference values of (Admission DT) and (Discharge DT) will be in the field "Length_OF_Stay" field whose type will be VARCHAR(20)
Oops! My apologies , I just search on the forum and found Date Difference and replied. I will be careful next time.
Sorry to confuse you and thanks for your help its works