Showing results for dates and times - Scripting Blog [archived]

Jul 20, 2005
23
0
0

How Can I Determine the Date and Time that a Process Started?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I determine the date and time that a process started?-- BM Hey, BM. We’ve got good news for you: not only do we have an answer to your question, but we’re not going to bore everyone with any more stories regarding our Colt League All-Star team. Nope, we’re no longer haunted by the fact that, in a tie game, we had the ...

Scripting Guy!scripting techniquesVBScript
Jun 23, 2005
4
0
0

How Can I Determine the Date for the Friday in a Given Week?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Given a date, can a script tell me the date that the Friday for that week occurs?-- DLR Hey, DLR. Too bad you didn’t ask which dates Saturdays, Sundays, and holidays fall on; coincidentally enough, each of the Scripting Guys have memorized - years in advance - all the days that we aren’t required to come to work. When it come...

Scripting Guy!scripting techniquesVBScript
May 5, 2005
18
0
0

How Can I Determine the Week of the Month a Date Falls In?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I determine the week of the month a date falls in?-- AK Hey, AK. You’re probably familiar with the book Moby Dick, the story of a crazy sea captain who became obsessed with hunting down and finishing off the great white whale. Well, this question turned out to be the Moby Dick of the scripting world. When we first rea...

Scripting Guy!scripting techniquesVBScript
Mar 3, 2005
6
0
0

How Can I Determine the Elapsed Time Between Two Dates?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I tell how many days there are between two dates? For example, if I have a log file that says an application started on January 1, 2005 and that the application ended today, is there a way to determine how many days the application ran?-- AL Hey, AL. You know, in the second Hey, Scripting Guy! column ever written ("Ho...

Scripting Guy!scripting techniquesVBScript
Jan 27, 2005
12
0
0

How Can I Determine the System Time on a Computer?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there any way to retrieve the system time as configured on a remote computer?-- JJ Hey, JJ. There are at least two ways to do this, both using WMI. If you’re running Windows XP or Windows Server 2003, you can use the WMI class Win32_LocalTime. As you can see, that makes it pretty easy to get the system time: you simply con...

Scripting Guy!scripting techniquesVBScript