Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how return the data timestamp after some days in python

import datetime
 
Current_Date_Formatted = datetime.datetime.today().strftime ('%d%m%Y') # format the date to ddmmyyyy
print ('Current Date: ' + str(Current_Date_Formatted))
 
Previous_Date = datetime.datetime.today() - datetime.timedelta(days=1)
Previous_Date_Formatted = Previous_Date.strftime ('%d%m%Y') # format the date to ddmmyyyy
print ('Previous Date: ' + str(Previous_Date_Formatted))
 
NextDay_Date = datetime.datetime.today() + datetime.timedelta(days=1)
NextDay_Date_Formatted = NextDay_Date.strftime ('%d%m%Y') # format the date to ddmmyyyy
print ('Next Date: ' + str(NextDay_Date_Formatted))
Comment

PREVIOUS NEXT
Code Example
Python :: python pandas get labels 
Python :: how to make dictionary in python 
Python :: how to get last n elements of a list in python 
Python :: python last n array elements 
Python :: python sockets 
Python :: find all regex matches python 
Python :: delete from list python 
Python :: get_absolute_url django 
Python :: python import graphviz 
Python :: python get desktop environment 
Python :: django password field 
Python :: how to send file in python request 
Python :: sum with conditional python 
Python :: reading binary file 
Python :: replace word in column pandas lambda 
Python :: how to find maximum number from python list 
Python :: python timer() 
Python :: how to use dictionaries in python 
Python :: django url static 
Python :: print random integers python 
Python :: # find out indexes of element in the list 
Python :: import django concat 
Python :: read data from s3 bucket python 
Python :: python script in excel 
Python :: remove special characters from string in python 
Python :: Python RegEx Escape – re.escape() 
Python :: merge two columns pandas 
Python :: pyflakes invalid syntax 
Python :: superscript python 
Python :: tkinter dialog box 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =