Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

age in days to age in years


CurrentDate = rs("Dateofbirth")
Years = DateDiff("yyyy", CurrentDate ,date)
ThisYear = DateAdd("yyyy", Years, CurrentDate)
Months = DateDiff("m", ThisYear ,date)
ThisMonth = DateAdd("m", Months, CurrentDate)
Days = DateDiff("d", ThisMonth, date)
Age = CStr(Years) & " years" & CStr(Months) & " months" & CStr(Days) & Days

Comment

PREVIOUS NEXT
Code Example
Python :: get size of window tkinter 
Python :: python prompt for input 
Python :: python setup.py bdist_wheel did not run successfully 
Python :: how to print numbers from 1 to 20 in python 
Python :: python csv write add new line 
Python :: django reverse 
Python :: how to convert month to number in python 
Python :: python get current time without milliseconds 
Python :: How do you sum consecutive numbers in Python? 
Python :: discord.py play mp3 file 
Python :: jupyter notebook show more rows 
Python :: how to split an input in python by comma 
Python :: AssertionError: Relational field must provide a `queryset` argument, override `get_queryset`, or set read_only=`True` 
Python :: google colab matplotlib not showing 
Python :: datetime one month ago python 
Python :: django import model from another app 
Python :: matplotlib background color 
Python :: pandas convert column to index 
Python :: tkinter center frame 
Python :: matplotlib x axis at the top 
Python :: change dataframe column type 
Python :: PySpark null or missing values 
Python :: how to subtract 2 lists in python 
Python :: how to code a clickable button in python 
Python :: python pygame key input 
Python :: csv from string python 
Python :: remove grid in plt 
Python :: calculate market value crsp pandas 
Python :: age calculator in python 
Python :: python drop rows with two conditions 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =