If you don't specifically need to keep the logic in the sql query itself, you may simply use Scala to compute the threshold value for the timestamp (using java.time._ for example).
After you have a threshold as a scala value, the query should become as simple as
usersQuery.map(_.userIf).filter(_.createdOn > threshold)
I hope this gives you enough material do figure out details on your own
Cheers
Ivano