时间:2021-05-22
例如下面的代码在当前时间返回:1368299689
Option Explicit Dim dtmDate If WScript.Arguments.Named.Count > 0 Then Syntax With WScript.Arguments.Unnamed ' Check command line arguments If .Count = 0 Then dtmDate = Now If .Count > 0 Then dtmDate = .Item(0) If .Count > 1 Then dtmDate = dtmDate & " " & .Item(1) If .Count > 2 Then dtmDate = dtmDate & " " & .Item(2) If .Count > 3 Then Syntax On Error Resume Next dtmDate = CDate( dtmDate ) If Err Then On Error Goto 0 Syntax End If On Error Goto 0 If Not IsDate( dtmDate ) Then SyntaxEnd With ' Calculate and display the resultWScript.Echo DateDiff( "s", "1970-01-01 00:00:00", dtmDate ) Sub Syntax WScript.Echo vbcrlf _ & "Date2UTC.vbs, Version 1.00" _ & vbCrLf _ & "Convert any date/time to Unix time (UTC)" _ & vbCrLf & vbCrLf _ & "Usage: CSCRIPT.EXE //NoLogo Date2UTC.vbs date [ time ]" _ & vbCrLf & vbCrLf _ & "Where: ""date"" is the date to convert (default: current date/time)" _ & vbCrLf _ & " ""time"" is the optional time to convert" _ & vbCrLf & vbCrLf _ & "Notes: Though often called UTC, Unix time does not take into account leap" _ & vbCrLf _ & " seconds, while ""official"" UTC does." _ & vbCrLf _ & " If the specified date is ambiguous, the current user's date" _ & vbCrLf _ & " and time format is assumed." _ & vbCrLf & vbCrLf _ & "Written by Rob van der Woude" _ & vbCrLf _ & "http://" WScript.Quit 1End Sub以上所述就是本文的全部内容了,希望大家能够喜欢。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
本文实例讲述了php实现将任意进制数转换成10进制的方法。分享给大家供大家参考。具体如下:php将任意进制的数转换成10进制,例如8进制转换成10进制,16进制
C语言实现时区转换函数的实例时区转换函数功能:把时区1的时间转换成时区2的时间参数:arg1--输入时间arg2--时区1(也是arg1当前时间所在的时区)ar
本文实例讲述了java实现将字符串中首字母转换成大写,其它全部转换成小写的方法。分享给大家供大家参考,具体如下:publicclassTestSubstring
本文实例讲述了JavaScript实现将xml转换成htmltable表格的方法。分享给大家供大家参考。具体如下:functionConvertToTable(
本文实例讲述了python实现将pvr格式转换成pvr.ccz的方法。分享给大家供大家参考。具体实现方法如下:importzlibimportstructimp