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))


Popular posts from this blog

Add User As Local Administrator On Domain Controller

Horizontally Scroll A Large Power Apps Gallery

Calling Dataverse Web API in PowerShell using Client Credentials