Announcements
No record found.
how can i calculate current day from given date
*This post is locked for comments
Do u mean days between current date or day of the given date?
For days between current date
substract current date minus given date you will get days
other wise
dayOfMth(givendate)
like 23/12/2017 i need to get 23 from 23/12/2017
use info(strFmt('%1',dayOfMth(today())));
n for total number of days
Didn't @NoMe answer your question? I think that dayOfMth() gives you what you asked for.
By the way, I have no idea what you mean by "n for total number of days". It's not even a sentence. Please invest some time to formulate your questions, if you want our help.
Hi,
Please use below code to get number of days from your current date/given date
static void AXC_NoOfDays(Args _args) { date d = mkDate(12,12,2017); // or today(); to given current date int FromDays, ToDays; FromDays = date2num(DateStartMth(d)); todays = date2num(d); info(strFmt("No of days: %1", (ToDays+1) - FromDays)); }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CP04-islander 24
Michel ROY 14
Jagadabi 6