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 

Try This - Bhaskar 1

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise
Author Message
Bhaskar



Joined: 04 Oct 2007
Posts: 2

PostPosted: Tue Sep 16, 2003 2:42 am    Post subject: Try This - Bhaskar 1 Reply with quote

Hello

I don't know the reason for my problem Put a command button on a new form
and write the code below on the command button's click event. ( I do it in
VB6 Enterprise Edition)

Private Sub Command1_Click()
Print Date + Time()
Print Time() + Date
End Sub

when we click the button after executing the program in each case we get
system date followed by time.
The logic fits for the first statement but I can't understand why date
comes first in the execution of second line though time function is called
first.

It is interesting...

Thanks

Archived from group: microsoft>public>vb>enterprise
Back to top
View user's profile Send private message
Al Reid



Joined: 04 Oct 2007
Posts: 5

PostPosted: Mon Sep 15, 2003 5:44 pm    Post subject: Re: Try This - Bhaskar 1 Reply with quote

Try changing the + (Adding the numeric values of date and time, stored
internally as doubles(?)) to a & and see what happens. The date and time
will be converted to strings and will be concatenated giving you Time
followed by Date.

Al

"Bhaskar" wrote in message@TK2MSFTNGP10.phx.gbl...
> Hello
>
> I don't know the reason for my problem Put a command button on a new form
> and write the code below on the command button's click event. ( I do it
in
> VB6 Enterprise Edition)
>
> Private Sub Command1_Click()
> Print Date + Time()
> Print Time() + Date
> End Sub
>
> when we click the button after executing the program in each case we get
> system date followed by time.
> The logic fits for the first statement but I can't understand why date
> comes first in the execution of second line though time function is called
> first.
>
> It is interesting...
>
> Thanks
>
>
>
>
>
>
>
>
>
>

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 Enterprise 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