msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

determining system time

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
Ken



Joined: 04 Oct 2007
Posts: 7

PostPosted: Thu Jun 21, 2007 7:36 am    Post subject: determining system time Reply with quote

Hi All,

I want to determine the system time and display it in a text box. I am using
Time() function for this.

Time() function returns time in " hh:min:sec" format.

I need the result only in "hh:mm" format. Is any other function available
for this?
How can i achieve this?

Thanks

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
MikeD



Joined: 04 Oct 2007
Posts: 3348

PostPosted: Thu Jun 21, 2007 10:56 am    Post subject: Re: determining system time Reply with quote

"Ken" wrote in message @microsoft.com...
> Hi All,
>
> I want to determine the system time and display it in a text box. I am
> using
> Time() function for this.
>
> Time() function returns time in " hh:min:sec" format.
>
> I need the result only in "hh:mm" format. Is any other function available
> for this?
> How can i achieve this?

Use the Format function to format it for display purposes however you want.

Text1.Text = Format$(Time,"hh:mm")


--
Mike
Microsoft MVP Visual Basic
Back to top
View user's profile Send private message
Ken



Joined: 04 Oct 2007
Posts: 7

PostPosted: Thu Jun 21, 2007 9:06 am    Post subject: Re: determining system time Reply with quote

Hi..

Thanks for suggestion

"MikeD" wrote:

>
> "Ken" wrote in message
> @microsoft.com...
> > Hi All,
> >
> > I want to determine the system time and display it in a text box. I am
> > using
> > Time() function for this.
> >
> > Time() function returns time in " hh:min:sec" format.
> >
> > I need the result only in "hh:mm" format. Is any other function available
> > for this?
> > How can i achieve this?
>
> Use the Format function to format it for display purposes however you want.
>
> Text1.Text = Format$(Time,"hh:mm")
>
>
> --
> Mike
> Microsoft MVP Visual Basic
>
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group