Hi,
I have 2 questions:
1.I need to extract decimal portion of the number,multiply it with 0.6 and add it again .Example:
6.45= 6 + (45*0.6)=6.27
2.What function is used to substract dates
Thanks,
Lyn
EKC,
Regarding your question to "What function do I use to subtract dates", MGAGNON supplied you with how to get the "Number of days" between two dates, but if you need to take a date, and decrese it by a number of days, it is just as easy. Any date can have an integer added or subtracted from it, simply by issuing:
NewDate = Date()-2 && Skip 2 days
In which case, you would get a DATE result in new date, that is two days ago. (The DATE() function gives you the "Current" date, (at least according to your computers system clock... so if it's date is wrong, you will get the wrong answer...)
You can just as easily skip ahead a whole week, or two with:
You get the idea. However, if you want to move a "Month" (Since not all "Months" are 28 days long... (in fact, only 1), you cant use Date() + 28 to get an "Exact" skip of a month. Instead use:
NewDate = GOMONTH(Date(),1)
Assuming today's date is 8 Apirl, 2002 (08/04/2002) new date will return:
08/05/2002
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.