Hello,
Does anyone know how I can make the following code work....I am trying to
use the DatePart Function to parse out the hour and minute from a date/time
field. however I am getting the hour in military time. To get around this
I thought I would subtract 12 from any hour 13 and over...below is my
code....it doesnt work....does anyone know how I can make it work..or is
there a better function I should be using?
TIA - Julie
<cfoutput query=QRYCasacActivity>
<cfif #datepart("h",QRYCasacActivity.BeginTime)# gt 12>
<td>(#datepart("h",QRYCasacActivity.BeginTime)# - '12')
#datepart("n",QRYCasacActivity.BeginTime)#</td>
<CFELSE>
<td>#datepart("h",QRYCasacActivity.BeginTime)#
#datepart("n",QRYCasacActivity.BeginTime)#</td>
</cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists