Home » Developer & Programmer » Forms » how to change Format mask date in Ontime Where
how to change Format mask date in Ontime Where [message #442849] Thu, 11 February 2010 00:02 Go to next message
aljabali
Messages: 53
Registered: July 2008
Member
hii

how to change Format mask date in Ontime Where

same

TO_CHAR(HIRE_DATE,'DD/MM'YYYY')
Re: how to change Format mask date in Ontime Where [message #442853 is a reply to message #442849] Thu, 11 February 2010 00:21 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Is it depends on the data which you are passing ??

I mean,

If the date is '01-JAN-10' then, the format will be 'DD-MON-YY'

If the date is '2010-01-01' then the format will be 'YYYY-MM-DD'

please explain
Re: how to change Format mask date in Ontime Where [message #442861 is a reply to message #442849] Thu, 11 February 2010 00:46 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure what HIREDATE is, but here's what I supposed: it is a control block column; once you enter a value in there, you'd want to fetch all records from a certain table whose value is equal to control block's HIREDATE item.

If so, here you are; the main "problem" is that you need to correctly concatenate all parts of the ONETIME_WHERE clause, as there is a fixed part of it (first part of the WHERE clause, parenthesis, date format mask) and variable one (HIREDATE item). In order not to get confused, you can use CHR(39) which represents a single quote, instead of its sign ('). That's what I did.

Here's a screenshot of a form based on Scott's EMP table. I hope you'll get the idea.

/forum/fa/7439/0/
Re: how to change Format mask date in Ontime Where [message #443315 is a reply to message #442861] Mon, 15 February 2010 01:40 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
there is an error in your when-button-pressed trigger code.

You wrote:
  ow:= 'where hire_date=to_date(''01/02/2010'',''dd/mm/yyyy'')';
  SET_BLOCK_PROPERTY(block_name,ONETIME_WHERE,ow); 
  -- Somthing like that.


but the line would be
 ow:= 'hire_date=to_date(''01/02/2010'',''dd/mm/yyyy'')';
 SET_BLOCK_PROPERTY(block_name,ONETIME_WHERE,ow);   -- Somthing like that.
 


In ONETIME_WHERE or DEFAULT_WHERE , the where condition only include here no WHERE clause.

Regrads,
Tamzidul Amin.
Re: how to change Format mask date in Ontime Where [message #443318 is a reply to message #443315] Mon, 15 February 2010 01:50 Go to previous messageGo to next message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member
find the following attachment.

Tamzid.
  • Attachment: HIREDATE.fmb
    (Size: 44.00KB, Downloaded 1096 times)
Re: how to change Format mask date in Ontime Where [message #443321 is a reply to message #443315] Mon, 15 February 2010 02:08 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
tamzidulamin wrote on Mon, 15 February 2010 08:40

In ONETIME_WHERE or DEFAULT_WHERE , the where condition only include here no WHERE clause.

I think you are wrong about that; WHERE keyword is optional - you can use it, but you don't have to. If you do use it, it is not an error.
Re: how to change Format mask date in Ontime Where [message #443332 is a reply to message #443321] Mon, 15 February 2010 03:02 Go to previous message
tamzidulamin
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member

Dear Quote:
Littlefoot


Thanks for your kind information.

Tamzid.
Previous Topic: Maximizing Applet In Froms 10g
Next Topic: How to Browse specific folder or drive in forms 6i
Goto Forum:
  


Current Time: Fri Sep 20 07:39:54 CDT 2024