Rabu, 25 Desember 2013

[MS_AccessPros] RE: [MS_Ac cessPros] How do I f ormat a Da te/Time fi eld to dis play the a ctual time …

 

Hi Duane

I entered the Note Date from a form by selecting a date through the calendar control. On the form, the Note Date text box shows only the date portion, which is ok, because the time is needed only when viewing the report, to distinguish the notes which was entered on the same day but different time.

I check the note dates from the table and from the report. By assigning the NoteDt = Now()  or debug print from the immediate window, the output was perfectly fine.  I guess there's nothing wrong. I probably just need to use different ways or methods to achieve my task. For example a note was entered on 12/25/2013 10:20 AM. Later next day the user realized the date should be 12/24/2013 and changed it back by selected the new date from the calendar control, now the trouble is, if I set the NoteDt = now(), the date will won't change, it's always showing the current date time. If I set the NoteDt=Format(txtNoteDate, 'mm/dd/yyyy hh:nn') the date will be 12/24/2013 12:00 AM.

The post from Tony Meece mentions "using the Calendar Control and picking up ONLY a date. The time is Zero or 12:00 am. Try adding in the current Time back to it."


How do I add the time to it?


Merry Christmas


Phucon

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar