Ask a Question

Anyway to store milliseconds in VBScript?

SOLVED
whuang
Regular Contributor

Anyway to store milliseconds in VBScript?

Hi Support,

 

I would like to retrive a date/time value from datebase, and store the value in a variable in VBScript, but it automatically round up the milliseconds for me, which mess up my seconds in some case. Is there anyway I can keep the milliseconds using VBScript? or does TC has a buildin function to store the time value with milliseconds?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Anyway to store milliseconds in VBScript?

Hi,

 

I think that you need to check what value and in what format is retrieved from the database and properly assign it to VBScript variable.

Several links that might inspire:

https://www.tutorialspoint.com/vbscript/vbscript_date.htm

https://stackoverflow.com/questions/43736387/format-time-up-to-milliseconds-to-use-in-log-files

https://www.tek-tips.com/viewthread.cfm?qid=839835

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

2 REPLIES 2
AlexKaras
Community Hero

Re: Anyway to store milliseconds in VBScript?

Hi,

 

I think that you need to check what value and in what format is retrieved from the database and properly assign it to VBScript variable.

Several links that might inspire:

https://www.tutorialspoint.com/vbscript/vbscript_date.htm

https://stackoverflow.com/questions/43736387/format-time-up-to-milliseconds-to-use-in-log-files

https://www.tek-tips.com/viewthread.cfm?qid=839835

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

whuang
Regular Contributor

Re: Anyway to store milliseconds in VBScript?

Thanks @AlexKaras I converted the time in sql instead of VBScript, and it is working now

cancel
Showing results for 
Search instead for 
Did you mean: