Displaying something in a text item. [message #149937] |
Mon, 05 December 2005 14:53 |
Placey
Messages: 5 Registered: December 2005 Location: UK
|
Junior Member |
|
|
Hello everyone.. must say Im very glad that I have found this forum.
I was wondering if anyone could help.
I have set up a procedure so that I can display the datatype DATETIME in a text item.
I was curious as to what the syntax was to do this. I thought it may be something like
To_Char('block name'.'text item name', 'DATETIME')
Can anyone help?
|
|
|
Re: Displaying something in a text item. [message #149939 is a reply to message #149937] |
Mon, 05 December 2005 14:57 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Do you mean just output a date column as a character string, in a specific format of your choosing?
Just use the to_char function, but check out the sql reference guide for the proper syntax and for details on the format you can give your output.
|
|
|
Re: Displaying something in a text item. [message #149941 is a reply to message #149939] |
Mon, 05 December 2005 15:03 |
Placey
Messages: 5 Registered: December 2005 Location: UK
|
Junior Member |
|
|
Yes.. I just want to be able to use the sysdate and display it in a text item before it is added to the database.
Not sure what you mean by the sql reference guide.. very new.
Thanks for your help though.
|
|
|
|
|
Re: Displaying something in a text item. [message #150102 is a reply to message #149948] |
Tue, 06 December 2005 05:52 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
This is Forms, you might want your topic there , so I'll move it.
How on earth can you display a DATATYPE itself? You define a text item and you give it a data type, e.g. datetime. You probably want the system's date (SYSDATE). You can use the Forms variable: $$DATETIME$$ (not sure about the exact spelling). Set it in the "initial value" property. The format is set in the "Format" property.
Another option is:
:block.item := SYSDATE; in a post-query trigger or where ever you want it.
MHE
[Updated on: Tue, 06 December 2005 05:54] Report message to a moderator
|
|
|
Re: Displaying something in a text item. [message #150266 is a reply to message #149937] |
Tue, 06 December 2005 23:27 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Instead of worrying about displaying it as a character field just define the item as being of type date or datetime, give it a mask, and as suggested use $$DATE$$ or $$DATETIME$$ as the initial value.
David
|
|
|