Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

date manipulation

 
   Database Forums (Home) -> MS Access RSS
Next:  mouse scroll keeps scrolling through records want..  
Author Message
golan

External


Since: Jul 14, 2008
Posts: 22



(Msg. 1) Posted: Wed Dec 24, 2008 6:28 am
Post subject: date manipulation
Archived from groups: microsoft>public>access (more info?)

hello; i have a form that have date txtbox format mm/yy.
i want to check in the table what the last date that some customer paid and
to add one monte . for example if the date in the table 11/08 the date in the
form will be 12/08
--
golani

 >> Stay informed about: date manipulation 
Back to top
Login to vote
Tom van Stiphout

External


Since: Sep 29, 2008
Posts: 56



(Msg. 2) Posted: Wed Dec 24, 2008 7:56 am
Post subject: Re: date manipulation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 24 Dec 2008 06:28:01 -0800, golan wrote:

Date math is done with the DateAdd function. Look it up in the help
file.
Select MyDateColumn, DateAdd("m", 1, MyDateColumn) as NextMonth
from MyTable

-Tom.
Microsoft Access MVP


>hello; i have a form that have date txtbox format mm/yy.
>i want to check in the table what the last date that some customer paid and
>to add one monte . for example if the date in the table 11/08 the date in the
>form will be 12/08

 >> Stay informed about: date manipulation 
Back to top
Login to vote
golan

External


Since: Jul 14, 2008
Posts: 22



(Msg. 3) Posted: Sun Dec 28, 2008 4:12 am
Post subject: last payment [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

i need that the function add it to the last month
--
golani
 >> Stay informed about: date manipulation 
Back to top
Login to vote
Ken Sheridan

External


Since: Dec 27, 2008
Posts: 3



(Msg. 4) Posted: Sun Dec 28, 2008 9:07 am
Post subject: Re: last payment [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 28, 12:12 pm, golan wrote:
> i need that the function add it to the last month
> --
> golani

If the PaymenDate column is a true date/time data type then use:

=Format(DateAdd("m",1,DMax("PaymentDate", "Payments", "CustomerID = "
& [CustomerID])),"mm/yy")

If the last payment is stored in a text field in the table in a format
mm/yy then use the following as the ControlSource of a text box on
your form:

=Format(DateAdd("m",1,DMax("DateSerial(Right(PaymentDate,2),Left
(PaymentDate,2),1)","Payments","CustomerID = " & [CustomerID])),"mm/
yy")

where Payments is the table name, PaymentDate is the name of the text
column containing the payment dates in mm/yy format, and CustomerID is
a foreign key column of number data type identifying the customer.

Ken Sheridan
Stafford, England
 >> Stay informed about: date manipulation 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
CrossTab Manipulation - I'm working on a CrossTab Query The crosstab shows a mini timetable and looks almost exactly how I want (work in progress) I would like to be able to edit the data returned from within the CrossTab Query's output and it make the relevent changes to th...

Creating a visitor log based on a specific date out of dat.. - My office would like to keep track of visitor access into our building and many of the visitors we have tend to visit over a period of days and sometimes are recurring on a monthly or yearly basis. I have been asked to help the office transition from ...

Finding the Later of 2 Date fields in a query to make a 3r.. - Hi All I have a query based on a single Table the has the following fields: Field 1: BoughtDate Field 2: SoldDate Sometimes the SoldDate is earlier than the BoughtDate What I am trying to do is put the LATER one of these 2 date fields in a 3 date..

Carry forward a date in Aus short date format - I'm carrying forward a date in a data entry form by using an after-update procedure to set the default value. Private Sub txtRecDate_AfterUpdate() If Not IsNull(Me.txtRecDate.Value) then txtRecDate.DefaultValue = "#" & Me.txtR...

First Date / Last Date - I have a form based on a query. everytime its requeried... the data changes in the form... based on which at the bottom of that form I have a summary of it (text boxes) name, Total (total of amounts), First date & last date... I managed to get the...
   Database Forums (Home) -> MS Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]