how can i format the type date or timestamp to be in the format as follow
'20020415 06:00'
under Oracle we need to alter session but under DB2 what is the solution
Thanks MarcLodge
would you like more developp your last sentence what do you want to say with have a local format to have the date exactly like i whish 'yyyymmdd hh:mm'
I've not made a user exit ie LOCAL, but know it can be done, but only on a date field, NOT a timestamp.
I'd have a word with your DBA for further info as I think it's an installation thing. If you get no joy, come back to us.
Marc
an alternative way for you to do this is to define the field as Timestamp as would be done traditionally. However on this Timestamp you put an exit routine known as a FIELDPROC.
A FIELDPROC transforms data on insertion and converts the data to its original format on subsequent retrieval.
Therefore you could give it '20020415 06:00' in your code
Let the FIELDPROC convert it to
'2002-04-15-06.00.00.000000',
storing it on the database as such.
Then when you query it it will once again be returned as
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.