on 12-01-2009 6:05 PM
Hi All,
I am doing the scenario as file to mail. so here i am using java mappings for sending the file in mail attachment.
I have done my java mappings and its executed successfully. File is going successfully to third party.
Business wants date and timestamp in subject line.
Currently i am using mail subject line as EDI File.
But business needs the date and time in the subject line after EDI File as EDI File <yyyymmddhhmm>.
So my requirement here is adding the date and timestamp.
Can any one suggest how can write java code to acheive.
Thanks
Bhaskar
Thanks,
Bhaskar
http://www.astahost.com/info.php/system-date-java_t362.html
http://www.rgagnon.com/javadetails/java-0106.html
one search on google will help u.
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhaskar,
> Can any one suggest how can write java code to acheive.
Check this below links
http://www.javadb.com/get-current-date-and-time-with-the-simpledateformat-class
http://www.java-tips.org/java-se-tips/java.util/how-to-get-current-date-time.html
http://www.rgagnon.com/javadetails/java-0106.html
After getting the time stamp, you can concatenate the EDI file with timestamp.
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhaskar,
> Business wants date and timestamp in subject line.
1. Add the import statments at beginning
import java.util.Date;
import java.text.SimpleDateFormat;
2. Add these statments to get timestamp and Concatenate the subject line with string currentdate.
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm");
String currentdate = sdf.format(new Date());
subjectline = subjectline.concat(currentdate);
Regards,
Sunil Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.