Link to home
Start Free TrialLog in
Avatar of Quack
QuackFlag for United States of America

asked on

Date format issue with an excel report output from a cold fusion file using a sql query

Excel report output for date format isn't working as it did w/in html:

Will this work with an excel output? I'm getting an error when I try to use it the same way See the enter_que output below:

<cfoutput> 

#cellbeg# Queue Name #cellend# #cellbeg# Fifo Flag #cellend# #cellbeg# User ID #cellend# #cellbeg# Due Date #cellend# #cellbeg# Document ID#cellend# #cellbeg# Invoice Number #cellend# #cellbeg# Material Amount #cellend# #cellbeg# Discount Terms Percent #cellend# #cellbeg# Discount Terms Days #cellend# #cellbeg# Discount Terms Net #cellend# #cellbeg# FINCENDT #cellend# #cellbeg# Markview #cellend# #cellbeg# Work Item #cellend# #cellbeg# Date Entered Queue #cellend# 

</cfoutput> </font>
</tr>

<cfoutput query="queueData">
#begline#
#cellbeg1# &nbsp;#queueData.queue_name# #cellend# #cellbeg1# &nbsp;#fifo_flag# #cellend# #cellbeg1# &nbsp;#RETRIEVING_USER_ID# #cellend# #cellbeg1# &nbsp;#queueData.due_date# #cellend# #cellbeg1# &nbsp;#queueData.document_id#  #cellend# #cellbeg1# &nbsp;#queueData.invoice_num# #cellend# #cellbeg1# &nbsp;#queueData.material_amount# #cellend# #cellbeg1# &nbsp;#queueData.percent#  #cellend# #cellbeg1# &nbsp;#queueData.days# #cellend# #cellbeg1# &nbsp;#queueData.net# #cellend# #cellbeg1# #queueData.FINCENDT# #cellend# #cellbeg1# #queueData.markview# #cellbeg1# #queueData.workitem#  #cellbeg1# #queueData.dateFormat(enter_que,"mm/dd/yyyy")# 
#endline#
</cfoutput> 

Open in new window

Avatar of _agx_
_agx_
Flag of United States of America image

What's the error?
Avatar of Quack

ASKER

there's no error being thrown I just need the dates to be formatted mm/dd/yy in the excel report
Oh, it sounded like it was crashing: "I'm getting an error when I try to use it the same way ".

It should work the exact same way. If you need a two digit year, try:
          #queueData.dateFormat(enter_que,"mm/dd/yy")#

instead of:
        #queueData.dateFormat(enter_que,"mm/dd/yyyy")#
ASKER CERTIFIED SOLUTION
Avatar of Quack
Quack
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good catch.  I was too focused on the date mask ;-)  Though that syntax would trigger an error, so next time please be sure to accurately describe the problem and include the error message.
Avatar of Quack

ASKER

reached a resolution w/o assistance