on 12-26-2006 6:00 AM
Hi,
All
I need to pass the Current Date and Time Stamp to the Target Field
For Current Date there is a Standard Function Is There ,For Time stamp Is there any Standard Function is there or we Need to write write UDF ,if we need to write to UDF Please provid Java Code for that.
Marks is awardble
Thnx in advance
Regards
kumar
Use this piece of code to get the current time.
Calendar cal = new GregorianCalendar();
int intHour24 = cal.get(Calendar.HOUR_OF_DAY); // 0..23
int intMin = cal.get(Calendar.MINUTE); // 0..59
int intSec = cal.get(Calendar.SECOND); // 0..59
String strTime = intHour24":"intMin":"intSec;
return strTime;
Regards,
Jai Shankar
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 use the standard function currentDate.Right click and select properties.Provide the target format as HHmmSS.
Regards,
Smitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kumar,
<b>The standard function can handle both Date and time.</b>
Just double click on the function to open the properties.. you will find there are options for time as well..
Cheers,
Himadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Using this java code you can get both Date and Time...
import java.util.Date;
Date d = new Date();
return d.toString();
The format returned will be like this "Tue Dec 26 12:15:24 IST 2006"
To change the format, you can use get methods( getDate(), getHours() ) of Date class and concatenate them.
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.