Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7731 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 ?

Posted

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 !!!

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.