By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,698 Members | 1,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,698 IT Pros & Developers. It's quick & easy.

Time

P: n/a
If I have "2" In A textbox, "55" in a second textbox and "PM" in a third
textbox, how can I put them together into a single time value of 2:55 PM?

Thanks!

Mark
Nov 12 '05 #1
Share this Question
Share on Google+
8 Replies

P: n/a
Mark wrote:
If I have "2" In A textbox, "55" in a second textbox and "PM" in a third
textbox, how can I put them together into a single time value of 2:55 PM?

CDate(textbox1 & ":" & textbox2 & textbox3)

Did you really need to cross post this question to three
groups?
--
Marsh
MVP [MS Access]
Nov 12 '05 #2

P: n/a
Mark wrote:
If I have "2" In A textbox, "55" in a second textbox and "PM" in a third
textbox, how can I put them together into a single time value of 2:55 PM?

Thanks!

Mark


Sub TimTest()
Dim X as Integer
Dim Y As Integer
Dim Z As String
Dim d As Date
x = 2
y = 55
z = "AM"
d = x & ":" & y & " " & z
msgbox d & " " & format(d,"hh:nn")
End Sub

Change z to PM to see the change to PM...the hour will be 14

Nov 12 '05 #3

P: n/a
txtA & ":" & txtb & "PM"

or

Format(txtA & ":" & txtB & txtC, "hh:mm") will give you 14:55

"Mark" <mm*****@earthlink.net> wrote in message news:<0g******************@newsread3.news.atl.eart hlink.net>...
If I have "2" In A textbox, "55" in a second textbox and "PM" in a third
textbox, how can I put them together into a single time value of 2:55 PM?

Thanks!

Mark

Nov 12 '05 #4

P: n/a
Marsh,

Thank you for responding to my question!
Did you really need to cross post this question to three groups?<<

Yes, as a matter of fact! There are many expert regulars at CDMA and usually one
can rely on getting a solution here. However, I always like to post my questions
on MPA GettingStarted also to see if John Vinson responds. When he responds, he
usually has an unique solution and you can rely on it to work. I have a high
respect for John!!

Mark

"Marshall Barton" <ma*********@wowway.com> wrote in message
news:33********************************@4ax.com... Mark wrote:
If I have "2" In A textbox, "55" in a second textbox and "PM" in a third
textbox, how can I put them together into a single time value of 2:55 PM?

CDate(textbox1 & ":" & textbox2 & textbox3)

Did you really need to cross post this question to three
groups?
--
Marsh
MVP [MS Access]

Nov 12 '05 #5

P: n/a
"Mark" <mm*****@earthlink.net> wrote in
news:f8***************@newsread1.news.atl.earthlin k.net:
Did you really need to cross post this question to three groups?<<


Yes, as a matter of fact! There are many expert regulars at CDMA and
usually one can rely on getting a solution here. However, I always like
to post my questions on MPA GettingStarted also to see if John Vinson
responds. When he responds, he usually has an unique solution and you
can rely on it to work. I have a high respect for John!!


sigh ...

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #6

P: n/a
"Lyle Fairfield" wrote
sigh ...


Patience, I've heard, is a virtue, Lyle.

Perhaps you could work on being more patient-like in the New Year.
Nov 12 '05 #7

P: n/a
"Larry Linson" <bo*****@localhost.not> wrote in news:3F4Kb.49650$E17.15856
@nwrddc02.gnilink.net:
"Lyle Fairfield" wrote
sigh ...


Patience, I've heard, is a virtue, Lyle.

Perhaps you could work on being more patient-like in the New Year.


Naah ... Patience was a little blonde cheerleader in High School ... nothing
to do with virtue!

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #8

P: n/a
"Larry Linson" <bo*****@localhost.not> wrote in message news:<3F*******************@nwrddc02.gnilink.net>. ..
"Lyle Fairfield" wrote
> sigh ...


Patience, I've heard, is a virtue, Lyle.

Perhaps you could work on being more patient-like in the New Year.


To All CDMA Participants Old and New:

I've recently accepted Jesus Christ as my personal savior. I want to
become a "new" Larry Linson. Therefore I'm repudiating this post and
all of my posts to CDMA over these many years. Those posts were the
work of the "old" Larry Linson. He was a liar and a deceiver.

To all of you who've supported me I can only say I'm sorry for letting
you down. To all of you whose work I've stolen I say I will never do
it again. And to those of you I've slandered or hurt in some way I
hope you'll find it in your heart to forgive me.

Respectfully Yours,
(The New) Larry Linson
Nov 12 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.