How do i set a default date format when i start a database instance?
For ex:
- I have a database called workDb.
- I already have a program written which
inserts a record into a database table.
- That record has a date value too which
i want to insert into the Oracle 9i DB
in yyyy-mm-dd format.
- I do not want to change the SQL statement
in my program
- BUT when i start workDb instance is there
a way to tell that any date field should
be inserted in yyyy-mm-dd format only.
[Like, i can change the date format from
database to database]
is this really possible?
NOTE: I do not want to change the sql
statement in my progam
FYI: The SQL statement in my program is this
String mydate="2001-09-25";
String sql = "insert into myprofile(activationDate) values('"+mydate+"')";
Please help me on this.
--
Thanks a lot
For ex:
- I have a database called workDb.
- I already have a program written which
inserts a record into a database table.
- That record has a date value too which
i want to insert into the Oracle 9i DB
in yyyy-mm-dd format.
- I do not want to change the SQL statement
in my program
- BUT when i start workDb instance is there
a way to tell that any date field should
be inserted in yyyy-mm-dd format only.
[Like, i can change the date format from
database to database]
is this really possible?
NOTE: I do not want to change the sql
statement in my progam
FYI: The SQL statement in my program is this
String mydate="2001-09-25";
String sql = "insert into myprofile(activationDate) values('"+mydate+"')";
Please help me on this.
--
Thanks a lot