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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formating date using the CFGRID in ORACLE

Status
Not open for further replies.

doco

Programmer
Sep 28, 2000
32
GB
Hi,

I'm having difficulty formating dates using the CFGRID.
at the moment it looks like this:

2001-08-20 06:40:21

I want to show it as 20-08-01 in one column and 06:40:21 in another column and I don't want to tinker with the ORACLE date formatting.

Thanks,

Chris
 
While you can usually use the CF "DateFormat()" function, that won't work inside a CFGrid... It may be time to start tinkering with the Oracle date formatting funcitons after all.

 
PS, I mean in the SQL, not in the database itself... something like (this is Access so Oracle will be different)

SELECT Format(TheDate,'dd/mm/yy') AS FormattedDate
 
You could try this CF Tag:

CF_QueryFormat

Description
This is a simple tag that provides a clean way to apply a Cold Fusion expression--such as a function, like DateFormat--to an entire column in a Query. Useful in situations where you need to supply a query column to some other CF tag, like CFSELECT or CFGRID, but you need to do some basic number, date, concencation, or other formatting of the column first.

- tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top