How to get the DAY value from DATE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kathnicole
    New Member
    • Mar 2007
    • 33

    How to get the DAY value from DATE

    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
  • questionit
    Contributor
    • Feb 2007
    • 553

    #2
    *************** ******
    Last edited by questionit; Aug 31 '07, 09:44 AM. Reason: duplicate

    Comment

    • questionit
      Contributor
      • Feb 2007
      • 553

      #3
      Hi kathnicole

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

      [code=vb]
      Dim myDate As Date
      myDate = "10/04/2007"

      Dim myDay As String
      myDay = Format(myDate, "dd")

      MsgBox myDay
      [/code]

      Regards
      Qi


      Originally posted by kathnicole
      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

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        day(format(Date ,"DD/MM/YYYY"))

        Linq ;0)>

        Comment

        • kathnicole
          New Member
          • Mar 2007
          • 33

          #5
          Originally posted by missinglinq
          day(format(Date ,"DD/MM/YYYY"))

          Linq ;0)>

          Thanks guys.

          it solves my problem.

          regards,
          Kathy

          Comment

          Working...