on 09-17-2008 11:35 AM
Hi,
My UDF should have the todays date with the format of yyyyMMdd without any ( / ) or ( - ) inbetween.
please provide me a code to get this date format in UDF.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You do not need an UDF.
You can use DateTransformation function from Date functions group.there specify source and target date format.
You can write it yourself.
Dont select value from drop down.
Write it as yyyyMMdd
Save and activate mapping.
Test it. It will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
you can do this through graphical mapping even.
Use the date functions.
current date->Transform date(Date Trans)->target
Right click on Transform date and choose properties and set the target format.
Edited by: malini balasubramaniam on Sep 17, 2008 12:49 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
No need UDF there is standard function for date , give your source and target date format. that would work.
No UDF needed !
rgds
srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this code
Write this thing in import section :
java.text.SimpleDateFormat;java.util.Calendar
Write your code here:
String DATE_FORMAT = "yyyyMMdd";
SimpleDateFormat sdf =
new SimpleDateFormat(DATE_FORMAT);
Calendar c1 = Calendar.getInstance(); // today
result.addValue("" + sdf.format(c1.getTime()));
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sujatha
You need not to write UDF. The current date with yyyyMMdd formate. You need to use 'currentDate' functin in which u can remove date seperators.
Regards
Raj
Edited by: raj sharma on Sep 17, 2008 12:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you could use the standard function currentDate. If you double click on it you can specify the date as yyyyMMdd.
No need for an UDF.
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
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.