Kurusu
Kurusu

Reputation: 197

Is there a function that returns a date depending on the month assigned in Crystal Reports?

Is there an existing function in Crystal Reports?

Something like function({myTable.myDateColumn, x) //Where x is the number of the month and the function will return a date

Not like Month({myTable.myDateColumn) = x //Which I believe will just return a number.

Reason being: I need to get that date and assign it to a variable.

Upvotes: 0

Views: 53

Answers (1)

craig
craig

Reputation: 26262

You could try the DateAdd() function.

//Add 2 months to the database value
DateAdd("m", 2, {myTable.DateColumn})

//Subtract 3 months from the database value
DateAdd("m", -3, {myTable.DateColumn})

Upvotes: 1

Related Questions