|
View previous topic :: View next topic
|
| Author |
Message |
vasif
New User

Joined: 11 Feb 2008 Posts: 35 Location: Chennai
|
|
|
|
Hi,
I need to convert 2 digit year to 4 digit year using DB2. Are there any inbuilt functions or db2 sqlpl procedures available? If not, if any code exists, could it please be shared?
Thank you very much. |
|
| Back to top |
|
 |
sushanth bobby
Senior Member

Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Vasif,
You can try,
| Code: |
| SELECT '20'||twodigityearcolumn from creator.tablename; |
to add century and make it 4 digit. You need to have some logic to guess whether its 19 or 20.
Thanks,
Sushanth |
|
| Back to top |
|
 |
|
|