REreplace(string, "[^tTmMhHsH: ]", "", "all")
that'll strip out the extra chars --- 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: Ryan Emerle [mailto:[EMAIL PROTECTED] > Sent: Friday, April 04, 2003 11:28 AM > To: CF-Talk > Subject: RE: Time Format Question > > > Right, so make sure that the chars entered are part of the list > of acceptable chars? They don't all need to be there, just can't > have chars that aren't supposed to be there.. > > -----Original Message----- > From: Randell B Adkins [mailto:[EMAIL PROTECTED] > Sent: Friday, April 04, 2003 2:21 PM > To: CF-Talk > Subject: RE: Time Format Question > > > Cause the field does not need to have all those characters. > Trying to rule out someone putting in something that is not > part of the proper Time Mask paramters > > > >>> [EMAIL PROTECTED] 04/04/03 02:15PM >>> > Why don't you just check to make sure the mask contains only the chars: > "h,H,m,M,s,S,t,T,:" (or whatever the time chars are). > > -R > > -----Original Message----- > From: Randell B Adkins [mailto:[EMAIL PROTECTED] > Sent: Friday, April 04, 2003 2:03 PM > 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4