For example, to show the end of the month that a transaction is dated in.
CreateDateTime(YearFromDate(SLPostedCustomerTrans.TransactionDate),
MonthFromDate(SLPostedCustomerTrans.TransactionDate),
DaysInMonth(YearFromDate(SLPostedCustomerTrans.TransactionDate),
MonthFromDate(SLPostedCustomerTrans.TransactionDate)))