Calendar Option with Date and Time

  • Follow


I want to setup the calendar pop-up option to enter dates on a form.  The 
calendar works fine, but I need it to also enter time along wit the dates.  
In the table I have the date to display along with the time but when you 
choose the date from the calendar option it only shows the date not the time. 
 I went into the table and it is only showing the date.  I need the time it 
is entered because i have a report calculating the date and time difference.
0
Reply Utf 4/26/2010 11:20:01 PM

Hi

I think the reason for this is that the calender control is not really meant 
for selecting Now() but rather past or previous dates - there are much better 
ways of selecting today's date.

You could just use the Now() function OnClick, AfterUpdate, OnLoad, etc, etc 
or anywhere else that you want to record the time/date of an event - I would 
not use the calender control for this.

If you have a control called txtTimeDate you could have something like
Private Sub ButtonName_Click()
Me.txtTimeDate = Now()
End Sub

to give you the time date to store in your table

HtH
-- 
Wayne
Manchester, England.



"Alaska1" wrote:

> I want to setup the calendar pop-up option to enter dates on a form.  The 
> calendar works fine, but I need it to also enter time along wit the dates.  
> In the table I have the date to display along with the time but when you 
> choose the date from the calendar option it only shows the date not the time. 
>  I went into the table and it is only showing the date.  I need the time it 
> is entered because i have a report calculating the date and time difference.
0
Reply Utf 4/27/2010 7:08:06 AM


Thank you for your response.  I will keep that in mind.  The problem for me 
is the date will not always be the current date.  Some of the dates will have 
to be put in from past dates.

"Wayne-I-M" wrote:

> Hi
> 
> I think the reason for this is that the calender control is not really meant 
> for selecting Now() but rather past or previous dates - there are much better 
> ways of selecting today's date.
> 
> You could just use the Now() function OnClick, AfterUpdate, OnLoad, etc, etc 
> or anywhere else that you want to record the time/date of an event - I would 
> not use the calender control for this.
> 
> If you have a control called txtTimeDate you could have something like
> Private Sub ButtonName_Click()
> Me.txtTimeDate = Now()
> End Sub
> 
> to give you the time date to store in your table
> 
> HtH
> -- 
> Wayne
> Manchester, England.
> 
> 
> 
> "Alaska1" wrote:
> 
> > I want to setup the calendar pop-up option to enter dates on a form.  The 
> > calendar works fine, but I need it to also enter time along wit the dates.  
> > In the table I have the date to display along with the time but when you 
> > choose the date from the calendar option it only shows the date not the time. 
> >  I went into the table and it is only showing the date.  I need the time it 
> > is entered because i have a report calculating the date and time difference.
0
Reply Utf 4/27/2010 10:37:01 AM

I always like to "try" (not always possible) and keep the number of fields in 
a table down to the minimum required.  But you could (if you really want to 
keep using the calendar control) have a clock on the form as well and store 
the time in a seperate field or (better) use 2 unbound boxes on your form to 
collect date and time and then combine them before you store them in a 
date/time field in your table.  

I have just tried to gain a time stamp (not date) from a calendar control 
and couldn't do it.  Mabe there is a way that  don't know of and someone else 
will answer with the method.  But if it's not possible then you should just 
add a date and time into 2 boxes (unbound) then combine them into the correct 
format for a date/time field in your table

You could make it very simple for users to orperate by placing 2 buttons on 
the form
Use the time now
Use another date time
OnClick the 2 button would open the calendar and a clock - select these to 
add the data

Hope this helps
-- 
Wayne
Manchester, England.



"Alaska1" wrote:

> Thank you for your response.  I will keep that in mind.  The problem for me 
> is the date will not always be the current date.  Some of the dates will have 
> to be put in from past dates.
> 
> "Wayne-I-M" wrote:
> 
> > Hi
> > 
> > I think the reason for this is that the calender control is not really meant 
> > for selecting Now() but rather past or previous dates - there are much better 
> > ways of selecting today's date.
> > 
> > You could just use the Now() function OnClick, AfterUpdate, OnLoad, etc, etc 
> > or anywhere else that you want to record the time/date of an event - I would 
> > not use the calender control for this.
> > 
> > If you have a control called txtTimeDate you could have something like
> > Private Sub ButtonName_Click()
> > Me.txtTimeDate = Now()
> > End Sub
> > 
> > to give you the time date to store in your table
> > 
> > HtH
> > -- 
> > Wayne
> > Manchester, England.
> > 
> > 
> > 
> > "Alaska1" wrote:
> > 
> > > I want to setup the calendar pop-up option to enter dates on a form.  The 
> > > calendar works fine, but I need it to also enter time along wit the dates.  
> > > In the table I have the date to display along with the time but when you 
> > > choose the date from the calendar option it only shows the date not the time. 
> > >  I went into the table and it is only showing the date.  I need the time it 
> > > is entered because i have a report calculating the date and time difference.
0
Reply Utf 4/27/2010 11:36:01 AM

3 Replies
215 Views

(page loaded in 0.034 seconds)

Similiar Articles:
















7/22/2012 11:05:28 AM


Reply: