TimeFormat (and DateFormat) ignore characters they don't understand and send them directly to the output, with an apostrophe in there as well. The solution would be to strip out all illegal characters with an RE.
--- Barney Boisvert, Senior Development Engineer AudienceCentral (formerly PIER System, Inc.) [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: Randell B Adkins [mailto:[EMAIL PROTECTED] > Sent: Friday, April 04, 2003 11:03 AM > To: CF-Talk > Subject: Time Format Question > > > ok I have a field which allows a user to enter a > time format MASK to be used when displaying > time on a website. > > Example: user enters: H:MM:SS TT > > This is a proepr formatting mask for TIMEFORMAT. > > However if a user enters: NOTIMEFORMAT or something > stupid and off the wall, the timeformat function should > blow up. > > I entered: MONKEY as a mask and the TIMEFORMAT > function output: > #TimeFormat(Now(),MONKEY)# = 2O'N'K'E'Y > > > I also tried to use IsDate in conjunction with CREATEDATE > so I could have a valid date but an invalid time and it > returns as a true statement that it is a DATE. > > There is not IStime function.. anyone have an idea? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4