Kamis, 26 Desember 2013

Re: [MS_AccessPros] How do I format a Dat e/Time field to display the actual time…

 

Phucon-

The Format function merely takes the value you supplied in txtNoteDt and "formats" it as you specified.  If there is no time value in txtNoteDt, you will get 12:00 am.  You need to add a time, perhaps like this:

     !NoteDt = Format(Me.txtNoteDt + Time, "mm/dd/yyyy hh:nn AM/PM")) 

John Viescas

Sent from my iPad

On Dec 25, 2013, at 15:37, saigonf7q5@yahoo.com wrote:

Thank you Tony


I assigned the NoteDt as you can see from the code below. Doesn't it already have the time in the Format function?


How do I add the time to it in this case?


With rs
    .AddNew
     !Sid = Me.txtSID
     !NoteDt = Format(Me.txtNoteDt, "mm/dd/yyyy hh:nn AM/PM"))
     !Note = Me.txtNote
    .Update
    .Close
End With


Thank again and Happy holiday

Phucon

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

__,_._,___

Tidak ada komentar:

Posting Komentar