Home » Developer & Programmer » Forms » System current_datetime (merged threads)
System current_datetime (merged threads) [message #129942] Wed, 27 July 2005 06:48 Go to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
To get the date and time I am using this
System.current_datetime.

I want to use only date in a text item and I dont want time.
I did it by using substr of that till the date and am displaying that string.Is there any better way out?
System.current_datetime [message #129943 is a reply to message #129942] Wed, 27 July 2005 06:50 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
To get the date and time I am using this
System.current_datetime.

I want to use only date in a text item and I dont want time.
I did it by using substr of that till the date and am displaying that string.Is there any better way out?
Re: System.current_datetime [message #129949 is a reply to message #129942] Wed, 27 July 2005 07:25 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

hi,
create a text item in forms (datatype is date).
When-New-Form-Instance trigger:

:BLOCK_NAME.item_name := SYSDATE;


Regards

[Updated on: Wed, 27 July 2005 07:26]

Report message to a moderator

Re: System.current_datetime [message #130042 is a reply to message #129942] Wed, 27 July 2005 18:29 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use the to_date facility with a 'DD-MON-YYYY' mask, or whichever combination of 'D' for day, 'M' for month, 'Y' for year. The documentation is fairly clear on all this.

David
Re: System.current_datetime [message #130263 is a reply to message #129943] Fri, 29 July 2005 01:43 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
use TO_CHAR



by
vamsi
Re: System.current_datetime [message #130301 is a reply to message #129943] Fri, 29 July 2005 03:50 Go to previous message
manjuvasu
Messages: 22
Registered: May 2005
Junior Member
hi,
u can directly give in the property of text item as
initial value : $$DATE$$
and u can set the format mask too in the property.
Previous Topic: mask credit card number with "xxxx xxxx xxxx 1234"
Next Topic: problem in enabling/disabling the block in post query
Goto Forum:
  


Current Time: Fri Sep 20 07:24:17 CDT 2024