a9192shark
New member
- Joined
- Feb 9, 2007
- Messages
- 4
- Programming Experience
- 10+
Hello,
I have experience of VBA and I am developing my first app in VB within VS2005. The app will have to process hundreds of files on a frequent basis and import them into a SQL Server database. The user will select lots of files and then walk away from the machine. I want to be able to estimate the finish time so that they can watch progress and manage their time.
In VBA it is simple as the type date can be used in functions so the equation
dtFinish = dtStart + (Now() - dtStart) * lngFilesToProcess / lngFilesProcessed
would yield a date with the estimated finish time.
A similar approach in VB does not work as I get IDE errors in my code telling me I can not * a date and an integer.
I have looked at the timespan data type but I can not multiply the timespan either.
Do I really have to write code to determine the number of seconds and then calculate the date myself? How do I do this as timespan.seconds is readonly....
Help!
Thanks,
A.
PS I have also posted this to the MSDN site forum and will update both if I receive answers!
A.
I have experience of VBA and I am developing my first app in VB within VS2005. The app will have to process hundreds of files on a frequent basis and import them into a SQL Server database. The user will select lots of files and then walk away from the machine. I want to be able to estimate the finish time so that they can watch progress and manage their time.
In VBA it is simple as the type date can be used in functions so the equation
dtFinish = dtStart + (Now() - dtStart) * lngFilesToProcess / lngFilesProcessed
would yield a date with the estimated finish time.
A similar approach in VB does not work as I get IDE errors in my code telling me I can not * a date and an integer.
I have looked at the timespan data type but I can not multiply the timespan either.
Do I really have to write code to determine the number of seconds and then calculate the date myself? How do I do this as timespan.seconds is readonly....
Help!
Thanks,
A.
PS I have also posted this to the MSDN site forum and will update both if I receive answers!
A.