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

How to get the DAY value from DATE

P: 33
Hi there,

Could anyone please tell me how to get the Day (i mean DD from DD/MM/YYYY)
from the Date field.

I have a created a database for a Loan company. if the Loan Start Date is 20/01/2007, then the due date to pay the interest will be 20th of every month.

as of now, i have a field called Due Day where i manually enter the day for each loan information.

and i have a parameter query to enter the due day the user looking for .
based on the entry, it will list all the loan info corresponding to the DueDay.

Is there any other better to do this? like, instead of manually entering the value for Due Day,
once the Loan Start Date is entered, it should get the DD value and assign for the Due Day field automatically.

Need someone's help

chuz,
Kathy
Aug 31 '07 #1
Share this Question
Share on Google+
4 Replies


100+
P: 553
*********************
Aug 31 '07 #2

100+
P: 553
Hi kathnicole

You can get DD very easily. Here is an example:

Expand|Select|Wrap|Line Numbers
  1. Dim myDate As Date
  2. myDate = "10/04/2007"
  3.  
  4. Dim myDay As String
  5. myDay = Format(myDate, "dd")
  6.  
  7. MsgBox myDay
  8.  
Regards
Qi


Hi there,



Could anyone please tell me how to get the Day (i mean DD from DD/MM/YYYY)
from the Date field.

I have a created a database for a Loan company. if the Loan Start Date is 20/01/2007, then the due date to pay the interest will be 20th of every month.

as of now, i have a field called Due Day where i manually enter the day for each loan information.

and i have a parameter query to enter the due day the user looking for .
based on the entry, it will list all the loan info corresponding to the DueDay.

Is there any other better to do this? like, instead of manually entering the value for Due Day,
once the Loan Start Date is entered, it should get the DD value and assign for the Due Day field automatically.

Need someone's help

chuz,
Kathy
Aug 31 '07 #3

missinglinq
Expert 2.5K+
P: 3,532
day(format(Date,"DD/MM/YYYY"))

Linq ;0)>
Aug 31 '07 #4

P: 33
day(format(Date,"DD/MM/YYYY"))

Linq ;0)>

Thanks guys.

it solves my problem.

regards,
Kathy
Sep 2 '07 #5

Post your reply

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