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

Inserting Monthwise total day

P: 7
I have two table (one is monthwise day count,i.e. jan-30,Feb-28,Mar-31 etc and another table is a structure for attendence like the following:

Code Name total-day Day-present Leave Paid-day
100 G.Saha 30 29 1 29
101 A.Ghosh 30 30 0 30
102 B.Roy 30 28 2 28

Now my question is, how I can make such relationship between this two table so that when I select a month from month table and corresponding day count of that month will be reflected on total-day field of the attendence table .
Jul 23 '07 #1
Share this Question
Share on Google+
2 Replies


hariharanmca
100+
P: 1,977
I have two table (one is monthwise day count,i.e. jan-30,Feb-28,Mar-31 etc and another table is a structure for attendence like the following:

Code Name total-day Day-present Leave Paid-day
100 G.Saha 30 29 1 29
101 A.Ghosh 30 30 0 30
102 B.Roy 30 28 2 28

Now my question is, how I can make such relationship between this two table so that when I select a month from month table and corresponding day count of that month will be reflected on total-day field of the attendence table .
Can you give the desigen of another table?
Jul 23 '07 #2

missinglinq
Expert 2.5K+
P: 3,532
To be honest, I'm not sure exactly what it is you're trying to accomplish, but a single line of code will give you the day count for a given month, even taking into account the difference in February in a leap year, without needing a separate table. Perhaps this will be of use to you:

Day(DateSerial(Year(YourDate),Month(YourDate)+1,0) )

Welcome to TheSccripts!

Linq ;0)>
Jul 23 '07 #3

Post your reply

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