how to fetch last one week transactions in x++?

any on reply me

what transactions you are talking about? Do you have a date on the transactions?

please elaborate.

yes i have field on the table which represents (Transdate) .

To get last seven days (what ever the number) from today, minus the number of days from today

Example:

TransDate fromDate = systemdateget() - 7;

while select youtTable

where yourTable.TransDate >= fromDate

&& yourTable.TransDate < systemdateget()

You can also use query framework for this.