Needint a converter that can convert time zones

sberry1

Member
Licensed User
Hello there,

I am looking for a time converter that will take the time zones around the world and convert them in to 24 hour time and also allow you to see the difference in plus or minus hours according to what time zone your in. Does anyone have a converter like this?
 

sberry1

Member
Licensed User
Sure I can try. Okay say the time is set in 12 hour time as 1:30 I would like to see that as 13:30 hours. This is the time itself. Now the next part is a bit tricker. I would like to have access to a combo box that says for instance "North Americ, Canadea, Mexico" "South America", "Asia", the different time zones in Europe. So what this combo box does is get you in the right time zone and it converts the twelve hour format over in to a 24 hour UTC format. I hope that clears up the explanation. If not please ask for more info.

QUOTE=agraham;14559]As no-one has yet replied I suspect that, like me, they haven't understood what it is you want :confused:

Can you explain how you see a timezone being represented and what you want to convert from and what you want it converted to?[/QUOTE]
 

specci48

Well-Known Member
Licensed User
Longtime User
Hi sberry1,

I added a small example which converts the current time to different timezones.
I assumed that your local timezone is england but this can be changed easyly.

specci48
 

Attachments

  • TimeZones.sbp
    2 KB · Views: 207

sberry1

Member
Licensed User
Just one more question can you show me what the global variables might look like just to make sure I understand. I am just beginning with B4PPc and still learning it's way of doing things. If you can show me what they would look like in that time example I would surely appreciate that please?
 

specci48

Well-Known Member
Licensed User
Longtime User
Hmmm... I'm not really sure if I understand your question. :sign0013:
Do you wan't an explanation of the differences between global and local variables?

Global variables must be declared in the special "Sub Globals". These variables can be accessed throughout the whole program, so one sub can change the value of a variable and another sub can read the value.

All other variables are only accessible within their original sub. If the sub has been processed, all values of the "local" variables are lost.


specci48
 

sberry1

Member
Licensed User
What I am looking for is an example of the global variable. So for example what would you use for a global variable.

Hello there,

I am looking for a time converter that will take the time zones around the world and convert them in to 24 hour time and also allow you to see the difference in plus or minus hours according to what time zone your in. Does anyone have a converter like this?
 

BjornF

Active Member
Licensed User
Longtime User
Dear sberry, like specci48 said, any variable which you would like to use throughout the program and which you want access and change in different subs can be declared as a global variable.

For example, in some programs you might want to keep track of which is the current record in a database, in which case you might use a global variable called e.g. CurrRec. Calling on one sub might move the current record i.e. change the value of the CurrRec), and another sub might use CurrRec to determine which record to show on e.g. a panel. But the central point is that the value of CurrRec is available to all the subs throughout the program.

The global values don't have to have a specific form - you just need to declare them in the "sub Globals"

Björn
 
Top