- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to manipulate Date in PowerShell?
To add/remove date from the date string you need to use AddDay() method. For example,
We need to add 6 days to the current date.
(Get-Date).AddDays(6) 25 March 2020 22:40:36
To go back to the specific number of days, the same AddDays() method will be used but the numbers are negative.
For example,
(Get-Date).AddDays(-6) 13 March 2020 22:45:34
- Related Articles
- How to manipulate JavaScript's Date object?
- How to format date string in PowerShell?
- How to check windows certificate expiry date using PowerShell?
- How to retrieve the Azure VM deallocated date using PowerShell?
- Explain Get-Date function in PowerShell.
- How to manipulate DOM using a service worker in JavaScript?
- How to find the file modified after a certain date using PowerShell?
- How to get the certificate's start and expiry date using PowerShell?
- How to manipulate figures while a script is running in Python Matplotlib?
- How to check if the date is adjusted by Daylight saving time using PowerShell?
- How to manipulate CSS pseudo-elements ::before and ::after using jQuery?
- How does the tech industry manipulate its customers?
- Are there any ways to Manipulate Strings in Java.
- What are the methods in jQuery to manipulate attributes?
- Maintain and Manipulate Docker Containers

Advertisements