943,544 Members | Top Members by Rank

Ad:
Oct 3rd, 2007
0

how to separate the date into day, month, and year??

Expand Post »
Hello! I have problem here...

I want to separate 12-07-1007 into 3 parts, which are day(12), month(7), and year(1007).

I have made a function to do this separation and it works well.
But i wonder if there is exist a function in VB to do the separation?

Thank U... ^____^
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
lampie is offline Offline
5 posts
since Oct 2007
Oct 3rd, 2007
0

Re: how to separate the date into day, month, and year??

Do you have to input the date before the app separates them. Or does the app get the date from the computer?
Reputation Points: 26
Solved Threads: 5
Junior Poster
scudzilla is offline Offline
191 posts
since Mar 2007
Oct 3rd, 2007
0

Re: how to separate the date into day, month, and year??

simply try this
vb Syntax (Toggle Plain Text)
  1. MsgBox Day(Now) & " " & Month(Now) & " " & Year(Now)
Last edited by debasisdas; Oct 3rd, 2007 at 4:30 am.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Oct 3rd, 2007
0

Re: how to separate the date into day, month, and year??

Click to Expand / Collapse  Quote originally posted by debasisdas ...
simply try this
vb Syntax (Toggle Plain Text)
  1. MsgBox Day(Now) & " " & Month(Now) & " " & Year(Now)
i got the input from the computer system..

wow... it's works! So simple... ^__________^

Thanx...
Reputation Points: 10
Solved Threads: 1
Newbie Poster
lampie is offline Offline
5 posts
since Oct 2007
Oct 3rd, 2007
0

Re: how to separate the date into day, month, and year??

i'm using visual basic 2005 express edition. i tried
MsgBox Day(Now) & " " & Month(Now) & " " & Year(Now)MsgBox Day(Now) & " " & Month(Now) & " " & Year(Now)
but an error occur say day cant be use as an expresion.why is that so?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ramlisarip is offline Offline
7 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Mouse Wheel
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Convert Text or String to VB Command





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC