By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

Help to convert excel formula to access query

P: 1
Hi,

Please help to convert excel formula to MS access query
Expand|Select|Wrap|Line Numbers
  1. =TEXT(D2-MOD(D2-2,7),"dd-mmm-YYYY")&"  To  "&TEXT(D2+7-WEEKDAY(D2,2),"dd-mmm-yyyy")
Jul 28 '18 #1
Share this Question
Share on Google+
2 Replies


zmbd
Expert Mod 5K+
P: 5,397
You'll need to provide a bit more detail about your Access Database.

It would also help to know what it is that you are attempting to with the data. Often Access has a few different ways of handling things than Excel. Really not reasonable to expect us to decipher your formula; however, it appears that you are attempting get a result that returns something like:
"1-Dec-2018 to 8-Dec-2018"
However, why are you subtracting 2 from the date (d2?) and then adding seven back to this etc...
Are you trying to return the work-week?
Are you trying to just return a week span?
Jul 28 '18 #2

NeoPa
Expert Mod 15k+
P: 31,492
Expand|Select|Wrap|Line Numbers
  1. Excel Formula   ==> Access Expression
  2. TEXT(x,y)       ==> Format(x,y)
  3. MOD(x,y)        ==> x Mod y
  4. WEEKDAY(x,y)    ==> Weekday(x,y)
Jul 28 '18 #3

Post your reply

Sign in to post your reply or Sign up for a free account.