hi all,
I have to insert date and time to oracle db from pi and it has a format
mm/dd/yyyy hh:mm:ss am
or
mm/dd/yyyy hh:mm:ss pm
how can i achieve this in PI .how can i get time in 12 hr format...
thanks,
sahana
Request clarification before answering.
Hi,
Try with this little UDF (assuming that input is your input variable):
Date date = DateFormat.parse(input);
DateFormat df = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");
return df.format(date);
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.