How to retrieve the day,month,year,Weeks ,Hour,Minutes,Seconds passed in Vb6

this is the very basic way on how to use the DATEPART function in vb6,to retrieve
the day,month,year passed to the current date:

CODE:

Print "Days: " & DatePart("d", Now)
Print "Year: " & DatePart("yyyy", Now)
Print "Month: " & DatePart("m", Now)
Print "Quarter: " & DatePart("q", Now)
Print "Weeks: " & DatePart("w", Now)
Print "Hour: " & DatePart("h", Now)
Print "Minutes: " & DatePart("n", Now)
Print "Seconds: " & DatePart("s", Now)

Output:
the output will depends in your current system date,for my case,since my syte my
system date is December 21,2010 19:52:44 PM the output will look like this:

Days: 21
Year: 2010
Month: 12
Quarter: 4
Weeks: 3
Hour: 19
Minutes: 52
Seconds: 44

The Hardest Thing to Do is to Do Nothing
Hope you Like it Happy Coding!!!!
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.