Error - argument to Makeinstant should have

Hello experts

I always get the following error in my app that deals with testing time that's saved in CSV file and compare to the current time

my blocks though look fine and the time format that I am using in the file is HH:mm:ss

As shown here:

Any suggestion please why I am getting this error and how can I fix it

Thank you in advance

Connect to Companion, right mouse click on "Fair_iq.Text", "Do it" and post the result.

1 Like

Read the error message carefully to understand, that for time formats only hh:mm is supported

Taifun

1 Like

Thank you for the prompt response
I don't use any companion I try the app on an Android device (phone and Android TV screen) The error always appears on TV (more Stable on the phone devices)

Thank you for the promat resopnse I have read it but the format hh:mm:ss that I am asked to follow doesn't help
I am using 24 format (not 12 format)

Apologies for the blocks image is being huge
But I will post it seeking your help

The source of saved times:

Re-read what @Taifun posted....

1 Like

I believe this may do it for you:

1 Like

That's professional
Thank you so much

Note: on thinking, not sure what happens with mid-day, whether it returns a 12 or a 00. If it returns a 12 then try changing the 11 in the procedure to a 12.

image

1 Like

Thank you
I might switch to another screen (call it say updating data screen with timer) at midnight and return to the main screen to update the data
I hope it will resolve it

This looks very roundabout.

If all you want is milliseconds from midnight, why not use

This example was taken at 1:35 PM.

P.S. I assumed SystemTime started at midnight some day in 1970. I might be wrong, in which case some additive fudge factor might be needed.

1 Like

1 Like

Thank you all for highlighting this beneficial information
Yeah I got the point and I am trying to work on it
since the CSV file was saved in 24 time format (i.e. HH:mm example : 17:00 instead of 05:00 pm)

Now I need to work on it to re saved it in 12 hour time format
I hope it will eventually work

Also I won't forget to thank @TIMAI2 for his idea :clap: :

I would like to understand where exactly the problem is. Post the aia or better a small test aia (and especially the CSV file or a small test version of it).

It all looks unnecessarily complicated to me. The comparison between the current system time (time of day) and a specified time in the HH:mm format should not be a problem. I also don't see to what extent the time format (24-hour format) should be a problem here.

1 Like

2 Likes

Thank you for getting back to me

The app is working fine especially on mobile phones
But sometimes displays the above alert that I posted in the beginning
Sorry ti be so picky , Argument to MakeInstant should have form .............................. etc

It appears more often on android TV screens (or Android TV box that converts normal TV to Android TV Screen)
It appears specifically when the app move to a screen and return (the screen will close and open another after timer of 120,000 Millis)

I don't really know why this happens?
I don't even understand why it is more stable on mobiles but less stable on TV screens ?

Here's the main the screen

and here's the screen that it will open when the time for prayer is due

Then it will return by itself after 2 minutes time

This is the first app for me
I don't have the same experience you have guys

I tried every possible thing and I strongly beleiev that it needs a tiny modification but I have no clue
very challenging for me
2023_24.csv (26.5 KB)

Please find in the attachment the CSV file

Thank you in advance

Sam

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

1 Like

Yes
Thank you

prayer_publish_NoGraphic.aia (18.3 KB)

As already said a few times

and NOT hh:mm:ss

Taifun

1 Like

Alright thank you so much
understood

Q please
What's the best way to do comparison between two times?
Is the way that applied in the above aia file is ok
or it's better to use an extension like Tformat made by @Anke ?