Monday, April 20, 2009

date Function

add 5 years/months/days/hours/minutes/seconds to current date/time

$ date +%Y%m%d%H%M%S; date --date "now +5 years" +%Y%m%d%H%M%S
20090420161628
20140420161628
$ date +%Y%m%d%H%M%S; date --date "now +5 months" +%Y%m%d%H%M%S
20090420161639
20090920161639
$ date +%Y%m%d%H%M%S; date --date "now +5 days" +%Y%m%d%H%M%S
20090420161646
20090425161646
$ date +%Y%m%d%H%M%S; date --date "now +5 hours" +%Y%m%d%H%M%S
20090420161654
20090420211654
$ date +%Y%m%d%H%M%S; date --date "now +5 minutes" +%Y%m%d%H%M%S
20090420161659
20090420162159
$ date +%Y%m%d%H%M%S; date --date "now +5 seconds" +%Y%m%d%H%M%S


subtract xxx to current date/time

$ date +%Y%m%d%H%M%S; date --date "now -5 years" +%Y%m%d%H%M%S
20090420161922
20240420161922

$ date +%Y%m%d%H%M%S; 
date --date "now -5 years -1 months" +"%Y/%m/%d %H:%M:%S"
20090420162122
2004/03/20 16:21:22

Friday, February 13, 2009

Java.SQL.Exception The Network Adapter could not establish the connection

1. The port number can be 1526 or 1521. Confirm with tnsnames.ora on the Oracle Server.
2. If that is all right, then use the IP address of the Oracle host, rather than the name.

Tuesday, January 27, 2009

Empty Values Assigned to Variables in webMethods

Only when your are testing a Flow Service from webMethods Developer, you can pass an empty string ( or zero-length string ) to a service.



If you want to pass empty variables (variables that have no value), enable the "Include empty values for String Types" check box. When you enable this option, empty String variables are passed with a zero-length value. If you do not enable this option, the variables will be removed from pipelines.

Thursday, January 22, 2009

Map the first name from a document list

1. Add a MAP to your process flow
2. In Properties window, enter "Get the first name" to property Comments.
3. Drag a link line between records.name in Pipeline In to firstName in Pipeline Out.
4. Notice that when you click on the link, it displays the link's Properties.
5. Click on the "Edit..." button of the Indices property.
6. Enter 0 to the records text box, and then click on OK button
7. Notice that the color of the link changed to blue like below:

Insert SYSDATE via JDBC Adapter Service

This is how you can insert a Date + Time to Oracle DATE field in webMethods:

1. Open a new Adapter Serivce
-> Select "JDBC Adapter" type, click Next
-> Select your database "Adapter Connection Alias", click Next
-> Select "InsertSQL" Template, click Next
-> Enter the name of your new Adapter Service, click Finish

2. Select your table under Table tab

3. Add the system date column under INSERT tab.

4. Highlight your date column
-> Double click on the Expression field
-> Enter TO_DATE(TO_CHAR(sysdate, 'DD-MON-YYYY hh:mi:ss'),
'DD-MON-YYYY hh:mi:ss')