Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substring or Truncate ?

Status
Not open for further replies.

PreetiGanamani

Programmer
Jan 2, 2006
22
US
Hi,
I need some help on this one...

In my report i display a ParamDisplay value.
as
" Jan 3, 2005 12:00:00 AM" But i want to chage it to "Jan 3, 2005". Can u please tell me how to go about it step by step.

I tried to use the Substring Function and the Truncate Function but got error messages is both cases...

Please help me out with this...
Thanks
 
Hi,
I think you can do it using...trunc
Try this one...
trunc(to_char(to_date('Jan 3,2005 12:00:00','Mon DD, YYYY hh:mi:ss'),'MM/DD/YYYY HH24'),'DD')

I think it should work.
GK

 
Once you've used to_date to convert it to a date, you can use the Data Format property to display the date any way you like (allows for multiple formats if you display it differently anywhere else on the report)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top