I would change it to:

{{CDRYear, CDRMonth, _}, _} = calendar:gregorian_seconds_to_datetime(Timestamp)