Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help ! (format date heure)

Status
Not open for further replies.

frenchteck

IS-IT--Management
Feb 28, 2003
12
FR
I have a problem in my script, it 's stupid but I don't remember the command to compare 2 dates in Microsoft Excel.
(I make VBScript with NotePad)
How to have seconds passed between 2 moment ?
Here is an exemple of what i'm looking for, can someone help a newbee like me ?

Set ObjXL = WScript.CreateObject("Excel.Application")
ObjXL.Visible = True
ObjXL.Workbooks.Add

temps = now
For i = 1 to 10000
objXL.Cells(i,1) = i
Next

objXL.Cells(1,2) = (now - temps)

Thanks to help me
 
objXL.Cells(1,2) = dateDiff("s",now, temps) Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048
Tek-Tips Best Practices: FAQ183-3179
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top