|
|
|||||||
Hi All, Was wondering if anyone had sample code that figures out the previous day and also knows if it is the 1st of the month, the previous day rolls back a month and knows the last calendar day of the previous month? Thanks! Gus |
||||||||
|
|
|||||||
I think there are some UDF's in the UDF section that are able to do (almost) waht you want. Have a look in the UDF section. |
||||||||
|
|
|||||||
I use SerialDate, found in the UDF section, for all things like this. http://www.kixtart.org/forums/ubbthreads...=true#Post82573 for example Code: $yesterday=serialdate(serialdate(@date)-1) ? $yesterday or to break it down Code: ? @date $today=serialdate(@date) ? $today $yesterday=serialdate(@date)-1 ? $yesterday $yesterday=serialdate($yesterday) ? $yesterday |
||||||||
|
|
|||||||
OK ... call me a Noob ... but I have no idea what a UDF is. I am not a programmer but I do know kix as far as using all the stuff in the documentation. When I try to use the code example: $yesterday=serialdate(serialdate(@date)-1) I get the following error: ERROR : expected ')'! Thanks for the help. |
||||||||
|
|
|||||||
Okay... Mr. Noob Follow the link provided above. Copy the function to the bottom of your script. Use the example provided above... whala! |
||||||||
|
|
|||||||
Originally Posted By: gdalinis OK ... call me a Noob ... but I have no idea what a UDF is. I am not a programmer but I do know kix as far as using all the stuff in the documentation. "Noob" is not so good, I prefer "Gus Dalinis Systems Analyst" - it sounds like a cracking daytime TV show about a forensic computer scientist who solves cases that defeat the local law enforcement. Back from the plot... UDFs are described in the documentation and there is also a little more detail to be found in the FAQ forum: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943 |