February 23, 201015 yr I have a person working for me that no matter how many times I tell her she must enter a date as "x/x/xxx", she insists on typing out the month name, "Jan or January". Since this date is inserted as part of a script, I would like a way to filter what ever she types, to match what everyone else types. It seems simple, but I just can't find it. I spent yesterday looking and experimenting, but no go. Just point me, and I will try and find my way. Note: I have used the drop down calendar, but she would rather type. I can't fire her (my girlfriend's sister), but I am at the point I am considering looking for a new girlfriend.
February 23, 201015 yr Since this date is inserted as part of a script I presume you mean within a custom message? What's your date format ("x/x/xxx" is not very telling) and what exactly does she enter? I am considering looking for a new girlfriend. Try the Services Wanted section?
February 24, 201015 yr Author That is really my big problem. She isn't consistent. Sometimes where I would like to see 9/17/2010, she will write September 9, 2010, or Sept. 17, 2010. The message says enter the date as x/xx/xxxx, but for whatever reason, she just doesn't remember. sound of head banging wall> I just need to have it return the correct format, no matter what she does. Or should I just give up. (I am going to miss my girlfriend) I am checking Match.com as we speak.
February 24, 201015 yr Well, one way to handle this would be to have her enter the data directly into a date field (NOT through a custom dialog). Then she'll get a nasty message if she tries to enter a text date. If you prefer to auto-correct the entry, there must be at least SOME consistency - though I believe both your examples could be handled by: Date ( Ceiling ( Position ( "janfebmaraprmayjunjulaugsepoctnovdec" ; Left ( entry ; 3 ) ; 1 ; 1 ) / 3 ) ; MiddleWords ( entry ; 2 ; 1 ) ; RightWords ( entry ; 1 ) )
February 24, 201015 yr Author I am constantly blown away by your solutions. Just when I think I am getting pretty good at this, I run into someone with skills I can't even fathom. I have seen "Ceiling" and "Position" functions, but would never have thought to use them together like that. Wow, simply, WOW!
February 24, 201015 yr Thanks, but I can't really take the credit for this one: http://fmforums.com/forum/showpost.php?post/119638/ All I did was to change it to use the Ceiling() function which wasn't available back then.
Create an account or sign in to comment