Thanks...that is exactly what I was looking for!!!!!!!!!!

Julie

>From: Jann VanOver <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: RE: manipulating DatePart Function???
>Date: Wed, 16 May 2001 15:09:14 -0700
>
>You can do this ALL with one function:
>   timeFormat(BeginTime,"h mm")
>
>The lower case h tells it to use 12 hr clock (use upper case for 24 hr)
>
>(Note you don't have to say "QRYCasacActivity.BeginTime" because you are
>inside a CFOUTPUT with query = QRYCasacActivity)
>
>-----Original Message-----
>From: Julie Clegg [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 16, 2001 2:59 PM
>To: CF-Talk
>Subject: manipulating DatePart Function???
>
>
>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

Reply via email to