Forum > VB.NET et VB 2005
le premier jour du mois suivant moins un jour.
MsgBox FormatDateTime(DateSerial(Year(Date),Month(Date)+1,1)-1,vbLongDate)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionstrComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2") Set objNewJob = objWMIService.Get("Win32_ScheduledJob") errJobCreated = objNewJob.Create _ ("Notepad.exe", "********123000.000000-420", _ True , 1 OR 4 OR 16, , , JobID) Wscript.Echo errJobCreated
J'aimerais poster autre chose sur du vbs, mais je ne trouve pas de section adéquate, est-ce normal?
Dim uneDate Dim mTab Dim final uneDate = FormatDateTime(DateSerial(Year(Date),Month(Date)+1,1)-1,vbShortDate) mTab = Split(Cstr (uneDate), "/") MsgBox mTab(1) MsgBox mTab(2) MsgBox mTab(0) final = (mTab(2)+mTab(1)+mTab(0)) msgBox (final)
Ah dac j'étais dans Visual Basic 6 > Langages dérivés > vbscript
MsgBox FormatDateTime(DateSerial(Year(Date),Month(Date)+1,1)-1,vbLongDate) & vbCrLf &_ FormatDateTime(DateSerial(Year(Date),Month(Date)+1,1)-1,vbShortDate) & vbCrLf &_ DateSerial(Year(Date),Month(Date)+1,1)-1
MyDate = DateSerial(Year(Date),Month(Date)+1,1)-1 MyDate = Right(MyDate,4) & Mid(MyDate,4,2) & Left(MyDate,2) MsgBox MyDate,,DateSerial(Year(Date),Month(Date)+1,1)-1
MsgBox DateSerial(Year(Date),Month(Date)+1,1)-1 & vbCrLf &_ DateSerial(Year(Date),Month(Date)+1,1-1)
MyDate = DateSerial(Year(Date),Month(Date)+1,1)-1 MyDate = Right(MyDate,4) & Mid(MyDate,4,2) & Left(MyDate,2) MsgBox MyDate
MyDate = DateSerial(Year(Date),Month(Date)+1,1)-1 MyDate = Right(MyDate,4) & Mid(MyDate,4,2) & Left(MyDate,2) MsgBox MyDate,,DateSerial(Year(Date),Month(Date)+1,1)-1