Group:  Microsoft Access ยป microsoft.public.access.adp.sqlserver
Thread: format time

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

format time
"JEM" <jennmertens[ at ]mindspring.com> 01.12.2005 16:03:43
Hi. I have a combo box that is based on a view. The combo displays a
beginning time and an end time for a class. I have the datetime field
converted so that it displays only the time as such: CONVERT(nchar(20),
dbo.tblClasses.BegTime, 108) AS Beg_Time. This displays the time in
military format like 13:00:00. I would like it to show 1:00 PM instead.
Anyone know how to do this? Thanks.

Jenn

Re: format time
"giorgio rancati" <giorgio_No_Spalmer_rancati[ at ]tiscali.it> 01.12.2005 17:04:55
Hi JEM,

try this
----
RIGHT(CONVERT(varchar,dbo.tblClasses.BegTime, 0),7)
----

bye
--
Giorgio Rancati
[Office Access MVP]

"JEM" <jennmertens[ at ]mindspring.com> ha scritto nel messaggio
news:1133453023.928721.264390[ at ]z14g2000cwz.googlegroups.com...
[Quoted Text]
> Hi. I have a combo box that is based on a view. The combo displays a
> beginning time and an end time for a class. I have the datetime field
> converted so that it displays only the time as such: CONVERT(nchar(20),
> dbo.tblClasses.BegTime, 108) AS Beg_Time. This displays the time in
> military format like 13:00:00. I would like it to show 1:00 PM instead.
> Anyone know how to do this? Thanks.
>
> Jenn
>


Re: format time
"JEM" <jennmertens[ at ]mindspring.com> 01.12.2005 17:53:00
Thanks! It works great.

Re: format time
"JEM" <jennmertens[ at ]mindspring.com> 01.12.2005 20:20:47
Hi again. I wonder if you would have another quick solution for me...in
the same combo box, i show the cost for the class which is a money
column. In the display of the combo box it shows fine: $250.00. But,
on my form, i have an unbound text box that displays the cost after a
class is chosen from the combo box. But, it is not displaying it
properly, it is showing 250. I formatted the text box as currency and
even tried using a custom format $###.00 but i still just get 250. Any
ideas?

Re: format time
"giorgio rancati" <giorgio_No_Spalmer_rancati[ at ]tiscali.it> 02.12.2005 11:17:17
Hi JEM.

Put in textbox's controlsource
----
=Val(Str([ComboBox].[Column](1)))
----
(check column number)
and put Currency in its Format properties


Bye
--
Giorgio Rancati
[Office Access MVP]

"JEM" <jennmertens[ at ]mindspring.com> ha scritto nel messaggio
news:1133468447.132238.215640[ at ]g43g2000cwa.googlegroups.com...
[Quoted Text]
> Hi again. I wonder if you would have another quick solution for me...in
> the same combo box, i show the cost for the class which is a money
> column. In the display of the combo box it shows fine: $250.00. But,
> on my form, i have an unbound text box that displays the cost after a
> class is chosen from the combo box. But, it is not displaying it
> properly, it is showing 250. I formatted the text box as currency and
> even tried using a custom format $###.00 but i still just get 250. Any
> ideas?
>


Re: format time
"giorgio rancati" <giorgio_No_Spalmer_rancati[ at ]tiscali.it> 02.12.2005 11:27:35
ops.
It's sufficient
----
=Val([ComboBox].[Column](1))
----

bye
--
Giorgio Rancati
[Office Access MVP]


Re: format time
"giorgio rancati" <giorgio_No_Spalmer_rancati[ at ]tiscali.it> 02.12.2005 11:54:06
ops.
In US currency it's sufficient
----
=Val([ComboBox].[Column](1))
----

bye
--
Giorgio Rancati
[Office Access MVP]


Re: format time
"JEM" <jennmertens[ at ]mindspring.com> 02.12.2005 17:41:33
Thanks!

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net