Page 2 of 2

Posted: Wed May 04, 2011 2:44 am
by priyadarshikunal
ray.wurlod wrote:
priyadarshikunal wrote:Depends on the definition on 6 months.
No it doesn't. I understand the requirement to be "the date 6 months prior to current date". ...
Apologies for ambiguous statement. The question in my mind at that time was

In case the date is 2011-03(-01) which will produce 2010-08(-30). Definition of 6 months remains constant but there seems to be a deviation from that definition (the result in first post and the result date after substracting 183 day).

Regards,

Posted: Thu May 05, 2011 12:12 am
by Tejas Pujari
priyadarshikunal wrote:
ray.wurlod wrote:How about DateFromDaysSince() with an offset of -183 ? ...
Depends on the definition on 6 months. it can be either that or

Code: Select all

if(link.field[5,2] <=6) Then (link.field[1,4]-1):12+link.field[5,2] - 6 else link.field[1,4]:link.field[5,2]-6
Why offset -183? will it suffice leap year and non leap year

Posted: Thu May 05, 2011 12:28 am
by ray.wurlod
Closely enough for most purposes.