OVH Cloud OVH Cloud

Configuration

4 réponses
Avatar
William
G'Day Folks,

I have a script that I want to use with SQL Server. What
I want the script to do is run a query in in sql for the
current date time as star date time and current date
time -24 hours for end date time. The script is supposed
to run daily reports taking bd for the past 24 hours.

My problem is that i'm not sure what to write in the
script to set the start date time as (windows current
time) and the end date time as (windows current time - 24
hours).

Here is the script:
if StartDateTime = "" then
Prompt1 = "Enter the start date for the report." &
vbcrlf & "Format: yyyy-mm-dd HH:mm:ss"
StartDateTime = InputBox(Prompt1,"Report Start
Date" , DefaultStartDateTime)
if len(startDateTime) = 0 then
'User click on Cancel
Wscript.Echo "Report Generation has been
cancelled."
Wscript.Quit
End If
end if

if EndDateTime = "" then
Prompt2 = "Enter the End date for the report." &
vbcrlf & "Format: yyyy-mm-dd HH:mm:ss"
EndDateTime = InputBox(Prompt2,"Report End Date" ,
DefaultEndDateTime)
if len(EndDateTime) = 0 then
'User click on Cancel
Wscript.Echo "Report Generation has been
cancelled."
Wscript.Quit
End If
end if


From my understanding I will need to write a function so
that start date time = windows current date time and that
end date time = windows current date time - 24 hours.

P.S. Is the format of the date time in windows the same
as the format of the script because that could be a
problem?

Thanks for all the help.

Your's truly.

4 réponses

Avatar
François Picalausa
Hello,

Et le fr dans microsoft.public.*fr*.vb ça veut dire Faisons le en Riant?
C'est toujours mieux qu'en râlant, certes.

Try to post your question in microsoft.public.vb.database. This one is the
wrong group.

--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net

"William" a écrit dans le message
de news:2748901c462be$aac4f7c0$
G'Day Folks,


Avatar
William
Dsl francois mais, c'est parce que je n'était pas caable
de trouver le newsgroup anglais pour vb.


-----Message d'origine-----
Hello,

Et le fr dans microsoft.public.*fr*.vb ça veut dire


Faisons le en Riant?
C'est toujours mieux qu'en râlant, certes.

Try to post your question in


microsoft.public.vb.database. This one is the
wrong group.

--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net

"William" a écrit


dans le message
de news:2748901c462be$aac4f7c0$
G'Day Folks,




.



Avatar
François Picalausa
Hello,

Il n'y a pas de mal, et excuse moi pour mon post qui était pour le moins
piquant ;-)

--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net

"William" a écrit dans le message
de news:274e201c462c2$dcee51c0$
Dsl francois mais, c'est parce que je n'était pas caable
de trouver le newsgroup anglais pour vb.


Avatar
Zoury
Salut! :O)

Dsl francois mais, c'est parce que je n'était pas caable
de trouver le newsgroup anglais pour vb.



essai aussi celui-ci, c'est le plus fréquenté (je crois..) :

microsoft.public.vb.general.discussion

--
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 - http://www.mvps.org/vbnet/
http://www.mentalis.org/agnet/apiguide.shtml - http://www.mztools.com/