[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Reading computer time with VBScript...Need Help



PureBytes Links

Trading Reference Links


string = FormatDateTime(Date[, NamedFormat])where NamedFormat can be vbLongTime (value = 3) or vbShortTime (value = 4)dingo 


<FONT 
face=Tahoma size=2>-----Original Message-----From: goldfreaz 
[mailto:goldfreaz@xxxx] Sent: Thursday, October 24, 2002 10:26 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
Reading computer time with VBScript...Need HelpI 
cannot seem to get the computer time into Amibroker.  Please help 
with the script below.  It works in VB, but not as a script.  
The format statement does not seem to be allowed in script.I want 
the time of day in military time in hours plus decimal 
minutes.EnableScript("vbscript");<%x = Format(time, 
"h:m")pos = InStr(x, ":")length = Len(x)hh = Left(x, pos - 
1)mm = Right(x, length - pos)afl.var("tradetime")= Csng(hh + mm / 
60)%>Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.