Calculate Date of Birth in SSRS

You can utilize this code in an Expression to find the Date of Birth.
=IIF(IsNothing(Fields!dateofbirth.Value), "",
IIF( ((Month(Now) - Month(Fields!dateofbirth.Value)) < 0) 
OR ((Month(Now) - Month(Fields!dateofbirth.Value)) = 0 
AND (Day(Now) - Day(Fields!dateofbirth.Value)) < 0), 
(Year(Now) - Year(Fields!dateofbirth.Value)) - 1,
(Year(Now) - Year(Fields!dateofbirth.Value))
))

Comments

Popular posts from this blog

Add User As Local Administrator On Domain Controller

How to Create SharePoint Items with Power Automate Desktop

Install/Configure Power Apps Mobile for U.S. Government and DoD User