SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Time value

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Time value
Author Message
Lee



Joined: 05 Jan 2001
Posts: 5

Post Time value Reply with quote

I have scripts that use the following commands to format the time value as follows:

Now(currenttime)
Format(currenttime,"hhmm",currenttimef)

The problem is that about 5% of the time I run the script the value in CURRENTIMEF comes out as "0000" instead of the real time. The other 95% of the time it works perfectly. Any clue what could cause this?

BTW, I've tried the macro command @T"hhmm" and it does not seem to have this problem. I'm planning to change my scripts to use the macro unless you can offer a cause/solution. Thanks!

Fri Jan 05, 2001 6:03 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Time value Reply with quote

0000 is valid value! For example time 0 hours 0 minutes and 15 seconds after
calling Format("00:00:15","hhmm",currenttimef)
will return "0000"

: I have scripts that use the following commands to format the time value as
: follows: Now(currenttime)
: Format(currenttime,"hhmm",currenttimef)

: The problem is that about 5% of the time I run the script the value in
: CURRENTIMEF comes out as "0000" instead of the real time. The
: other 95% of the time it works perfectly. Any clue what could cause this?

: BTW, I've tried the macro command @T"hhmm" and it does not seem to
: have this problem. I'm planning to change my scripts to use the macro
: unless you can offer a cause/solution. Thanks!

Fri Jan 05, 2001 6:11 pm View user's profile Send private message
Lee



Joined: 05 Jan 2001
Posts: 5

Post Re: Time value Reply with quote

Yes...I realize that is a valid time, however, this is occurring at several different times other than midnight, i.e. running a script at 4:25pm sometimes will return a value of "0000".

: 0000 is valid value! For example time 0 hours 0 minutes and 15 seconds after
: calling Format("00:00:15","hhmm",currenttimef)
: will return "0000"

Fri Jan 05, 2001 6:50 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Time value Reply with quote

Just my two cents, try converting to hh:mm and then removing the ":"
For example:
Format(time_variable, "hh:mm", string_variable)
Replace(string_variable, 3, 1, "", string_variable)

: Yes...I realize that is a valid time, however, this is occurring at several
: different times other than midnight, i.e. running a script at 4:25pm
: sometimes will return a value of "0000".

Mon Jan 08, 2001 3:37 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.