SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Possible bug with Format command

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Possible bug with Format command
Author Message
Greig



Joined: 15 Mar 2001
Posts: 49

Post Possible bug with Format command Reply with quote

I have noticed that, when formatting a time, the format command often returns "000000". The following JAL on my 3.2.4 installation causes the format_time variable to contain "000000" instead of "111035".

dim current_time, time
dim format_time, string

//now (current_time)
set (current_time, 11:10:35)
format (current_time, "hhmmss", format_time)

Any ideas why?

Wed May 01, 2002 6:26 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Possible bug with Format command Reply with quote

It does not recongise the mask as as a valid time format.

What you want can do more simple, in one line
Dim format_time, string, "@T"hhmmss""

Actually you don't even need that line, you can insert @T"hhmmss" and other macro-parameters directly in the place where you need it, for example

FileSave "c:\\data\\my_file_with_time@T"hhmmss"", "some text"

: I have noticed that, when formatting a time, the format command often returns
: "000000". The following JAL on my 3.2.4 installation causes the
: format_time variable to contain "000000" instead of
: "111035".

: dim current_time, time
: dim format_time, string

: //now (current_time)
: set (current_time, 11:10:35)
: format (current_time, "hhmmss", format_time)

: Any ideas why?

Wed May 01, 2002 8:15 am View user's profile Send private message
Greig



Joined: 15 Mar 2001
Posts: 49

Post Re: Possible bug with Format command Reply with quote

Can you explain why the mask "hhmmss" is not valid? It seems to work for some times and not for others. Why?

: It does not recongise the mask as as a valid time format.

: What you want can do more simple, in one line
: Dim format_time, string, "@T"hhmmss""

: Actually you don't even need that line, you can insert @T"hhmmss"
: and other macro-parameters directly in the place where you need it, for
: example

: FileSave "c:\\data\\my_file_with_time@T"hhmmss"",
: "some text"

Wed May 01, 2002 10:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Possible bug with Format command Reply with quote

I guess that the issue is in the value that you want to format. Most likely your default time format in the Control Panel is setup as "h:mm:ss tt". When the value to be formated is not recognized as a time value the format fails.

Here is an example:

dim current_time, datetime
dim format_time, string

//now (current_time)
set(current_time, "1/1/01 11:10:35")
format (current_time, "hhmmss", format_time)

As you cane see I changed the datatype of current_time variable to datetime

: It does not recongise the mask as as a valid time format.

: What you want can do more simple, in one line
: Dim format_time, string, "@T"hhmmss""

: Actually you don't even need that line, you can insert @T"hhmmss"
: and other macro-parameters directly in the place where you need it, for
: example

: FileSave "c:\\data\\my_file_with_time@T"hhmmss"",
: "some text"

Wed May 01, 2002 10:42 am 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.