User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,517 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,833 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 2831 | Replies: 4
Reply
Join Date: Oct 2007
Posts: 5
Reputation: lampie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
lampie's Avatar
lampie lampie is offline Offline
Newbie Poster

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

  #1  
Oct 3rd, 2007
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... ^____^
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Location: Pearl of the Orient Seas
Posts: 181
Reputation: scudzilla is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
scudzilla's Avatar
scudzilla scudzilla is offline Offline
Junior Poster

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

  #2  
Oct 3rd, 2007
Do you have to input the date before the app separates them. Or does the app get the date from the computer?
There are 10 types of people: those who understand Binary and those who don't!
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,444
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 87
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

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

  #3  
Oct 3rd, 2007
simply try this
  1. MsgBox Day(Now) & " " & Month(Now) & " " & Year(Now)
Last edited by debasisdas : Oct 3rd, 2007 at 4:30 am.
Share your Knowledge.
Reply With Quote  
Join Date: Oct 2007
Posts: 5
Reputation: lampie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
lampie's Avatar
lampie lampie is offline Offline
Newbie Poster

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

  #4  
Oct 3rd, 2007
Originally Posted by debasisdas View Post
simply try this
  1. MsgBox Day(Now) & " " & Month(Now) & " " & Year(Now)


i got the input from the computer system..

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

Thanx...
Reply With Quote  
Join Date: Oct 2007
Posts: 7
Reputation: ramlisarip is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
ramlisarip ramlisarip is offline Offline
Newbie Poster

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

  #5  
Oct 3rd, 2007
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?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 4:02 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC