on 08-17-2007 3:15 PM
Hi,
How to convert a field of type 'date' into 'decimal' on target side in while doing mapping.Anybody Pleaseee.....
Thanks & Regards,
Radhika.
Hi
No standard functions available for the tasks you mentioned.You need a UDF for the same.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the mapping, everything is pretty much passed as a String. So, if you can give me an example of the input and output of what you are trying to do in the mapping, I can probably design a UDF to handle your situation using the String class in java or basic XI provided functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to write a UDF. Don't have standard functions.
<b>Cheers,
*RAJ*</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Radhika,
Can you please give more details..like your input data format and expected decimal output format..
If you have date in the format of DD-MM-YYYY...or any separator in between then using substring / concate first u need to get only number format and then you can convert into integer / double number...
Let us know what exactly you want to achieve...
Nilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Radhika,
Use FormatNum option. Anyhow your input will never change,coz of the date input -since it has exactly 8 digits. Double click on the Format num in the properties give how the source and target must look like.
Please correct if i'm wrong.
Input -- 20070818
Output ---20070818.0
Am I right?
Best regards,
raj.
Hi Radhika,
As Raj suggested you can use Format Number function...but can you please tell us by converting date into Dec what actually you are trying to achieve. I mean if you tell us exact requirement we can provide you better solution.
If you want to convert date into number for comparison then we can declare a variable as a integer than decimal...becase there wont be any decimal places..
Please let us know the exact requirement.
Nilesh
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.