![]() ![]() ![]() |
||
|
The Trip Maintenance application now provides a useful drill-down mechanism for locating trips. Although this application is functionally sound, its appearance could be improved, including formatting dates and dollar amounts, and making long lists easier to read.
ColdFusion provides several functions to improve application appearance. These include the DateFormat
and DollarFormat
functions that format dates and currency variables.
Existing code |
Replacement code |
---|---|
#departureDate# |
#DateFormat(departureDate, "mm/dd/yyyy")# |
#returnDate# |
#DateFormat(returnDate, "mm/dd/yyyy")# |
#price# |
#DollarFormat(price)# |
#baseCost# |
#DollarFormat(baseCost)# |
departureDate
, returnDate
, and price
indicated in the table.
The Trip Search Results page appears:
The properly formatted Trip Detail page appears:
|
||
![]() ![]() ![]() |