Ugo DI LUCA Posted September 23, 2003 Posted September 23, 2003 Hi all, Sorry if this sounds a duplicate post, for those who already have seen this post , but I thought I should report this on a specific thread. Curiously, the way FM identifies non-alphanumeric characters may vary from your system settings. This is at least true for the ":" , which isn't considered as a separator on the French Setting (may be on other too). This may lead to some errors when your solutions might be dispatched around the world, and use some TimeToText functions for example. When I discovered it, I went for a search on the Forum to see if someone already had reported it, but nothing. In little time however, I've found a lot of answers that were totally false when included in my own files. For example, in a thread related to TimeToText functions, CaptKurt statued that "Left(TimeToText(TimeField), 5) is alot simpler and still results in 00:00" while Chuck was using Left( TimeField, Position( TimeField, ":", 1, 1) - 1 ) & Middle( TimeField, Position( TimeField, ":", 1, 1) + 1, 2 ) Chuck's calc was returning an accurate result while the other was totally false. link to the thread This sounds weird, and as I'm starting some work on time fields for my calendar solution, I'm concerned that the calcs I'm using wouldn't come as expected on other systems. I already had, like some other here, some unexpected result with the TextToDate function (which I changed all over with the Date() function. Is there another "bug" which we should be aware of ?
BobWeaver Posted September 23, 2003 Posted September 23, 2003 Just out of curiosity, what do you get if you try: LeftWords(TimeToText(TimeField),2)
Ugo DI LUCA Posted September 23, 2003 Author Posted September 23, 2003 BobWeaver said: Just out of curiosity, what do you get if you try: LeftWords(TimeToText(TimeField),2) TimeField = 01:04:00 LeftWords(TimeToText(TimeField),2)--->6:56:44 LeftWords(TimeToText(TimeField),5)---> idem and LeftWords(TimeToText(Substitute(TimeField,":"," ")),2)---> 00:01:42 !!!
Lee Smith Posted September 23, 2003 Posted September 23, 2003 TimeField = 01:04:00 BobWeaver = 0:01:44 CaptKurt = 1:04: chuck1 = 0:00:38 chuck = 0:00:05
SteveB Posted September 23, 2003 Posted September 23, 2003 Hugo: I just encountered the same thing working on my scheduler. I think Chuck is right with his parsing. I haven't come across anything else, but my solution is meant for US and Canada consumption so I doubt that I will find anything to weird. Steve
Ugo DI LUCA Posted September 23, 2003 Author Posted September 23, 2003 OK guys, here you/we are.. (edited : make sure you download the pdf attached to next post, so you can compare the results from each settings) I've made a lot of tests on this one and here's attached a file, with some globals in it. I MUST say that the title of this thread should be changed as there's no bug at all with the TimeToText, nor the TextToTime. BUT there surely is in the way FM interprets ":" for WordCount parsings.... So I discovered that while Chuck was basing his post assuming the original data was text, CaptKurt was instead giving an answer for the an riginal data that was Hour. So, once corrected Chuck's including a ":" in the missle, all is OK. Too bad the original poster didn't even replied to give some feedback. Nevermind. Also, I was a little confuse with TextToTime and TimeToText, as it was late yesterday night, and may be too early this morning. But there's a bug anyway. Check this attachment. WdCountAndTimeTest.fp5.zip
Ugo DI LUCA Posted September 23, 2003 Author Posted September 23, 2003 As I should have known, what you are seeing in my file will be correct, as you're using US settings. So here's a pdf print of the file with the results with the French version. WdCountAndTimeTest.fp5.pdf.zip
Recommended Posts
This topic is 7731 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now