Home » Developer & Programmer » Forms » How to convert date twice without using extra variables (Forms 6i)
How to convert date twice without using extra variables [message #324412] Mon, 02 June 2008 07:03 Go to next message
Messages: 32
Registered: June 2008
I have an LOV in my form START DATE,which is populated my dates from the gl_periods,I need to display the LOV as a to_char(start_date) but I cant store it like that because start_date is a date in my table.
So how can I get the display in char and storing in Date??

Re: How to convert date twice without using extra variables [message #324477 is a reply to message #324412] Mon, 02 June 2008 12:18 Go to previous message
Messages: 20847
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
LoV will display date in desired format (using the TO_CHAR function); but, as you are entering it into a DATE item, set this item's Format Mask property to reflect a format you are using. Data should be inserted correctly. Anyway, Oracle's internal date format is nothing like format we (humans) use.

For example (based on Scott's schema), if this is the record group query
select to_char(hiredate, 'dd.mm.yyyy') hire_date 
from emp
order by hiredate
and we create a LoV based on it, map the "hire_date" record group column to "emp.hiredate" data block item, set "emp.hiredate's" format mask property to "dd.mm.yyyy" (or even "dd. mon yyyy" or even "yyyy. mon dd" or ...), everything will be just fine.
Previous Topic: how to count record in a block?
Next Topic: querying a particular record based on date function
Goto Forum:

Current Time: Thu Oct 27 20:07:20 CDT 2016

Total time taken to generate the page: 0.11906 seconds