I'm trying to user EXEC TOOLS GET to retrieve a date field from ORACLE FORMS into a char variable like this :
EXEC TOOLS GET filter.generation_depuis INTO :qstrGenerationDepuis;
When I try to display the variable qstrGenerationDepuis I get this value :
27-JANV.-2
Instead of :
27/01/2020
Knowing that qstrGenerationDepuis variable is declared as string of 10 characters.
How should I retrieve the field in the user-exit to get the right date format ?
The extension of the user-exit file is .pcs
Thanks a lot in advance.
How about two-step procedure?
First get the value:
which sets the item to
27-JANV.-2Then convert it to desired format, but first you have to know which format you got. This is French, isn't it? Looks like
27th of January of... which year? What is-2? It can be any year between 2020 and 2029 because variable is 10 characters long:If we presume that it is the current year, then you might try something like this:
27-JANV.-2into a date by adding current year's last digit (that's whatsubstrdoes)apply
to_charto a new date value,27-JANV.-20, with desired format maskNot that it is impossible (obviously), but - you'd rather
filter.generation_depuisNote that you probably don't have to use
nls_date_languageparameter; I do, as my database runs in Croatian and our format is quite different than yours.