Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to change year of calander and run Specific program and change year after program finish
How can i do this in batch file or powershell script
----------------------
i find solution for Powershell
C#
Set-Date (Get-Date).AddYears(2) 

but also i want to do this in Windows Command Prompt
Posted
Updated 9-Dec-14 3:59am
v3

1 solution

The calendar is only reflecting the date and time of the system - change that you change the calendar...
http://technet.microsoft.com/en-us/library/ee176960.aspx[^]
 
Share this answer
 
Comments
AminMhmdi 8-Dec-14 5:32am    
I know set-date cmdlet
But i want only change year of date
Kornfeld Eliyahu Peter 8-Dec-14 5:34am    
Combine it with the Get-Date cmdlet and use its AddYear functionality...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900