You probably need "4:00 pm", with the space. So if all your time values will either end in "pm" or "am", you could use:
<cfset new_time = Left(time,len(time)-2) & ' ' & Right(time,2)> then insert that. Peter > All, > > I have a serices of strings coming back from a web service that I need > to parse i.e. Time = "4:00pm" that I need to parse to append to a date > to insert into a SQL Server database in a datetime field. How can I > get this into the correct format to insert into the table? > > CF MX7 Error > "4:00pm" is an invalid time format. > > Thanks in advance! > -Jim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241978 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

