|
-
Oct 22nd, 2000, 06:24 AM
#1
Thread Starter
Fanatic Member
How do I format Sunday, October 22, 2000 07:26:00-EDT so that I can get the day number by itself and the month by itself. Then I want to get 07:26:00 into a string!
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Oct 22nd, 2000, 07:42 AM
#2
Thread Starter
Fanatic Member
I think i new that already, but i didn't use it for a reason! CUZ IT DOESN'T WORK!
THIS IS WHAT I GET: Sunday, October 22, 2000 08:41:06-EDT
AND I WANT TO GET EACH WORD BY ITSELF. FOR EXAMPLE:
SUNDAY <--BY ITSELF
OCTOBER <--BY ITSELF
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Oct 22nd, 2000, 12:28 PM
#3
Addicted Member
hi VIP3R !!!
Look at the help under "format"
'day Name
debug.print format(date(),"dddd")
'month Name
debug.print format(date(),"mmmm")
and so on
-cu TheOnly
-
Oct 22nd, 2000, 12:53 PM
#4
Frenzied Member
Some other cool intrinsic funcitons to look at...
Here are some other cool VB intrinsic functions you can play with:
Code:
MsgBox Now ' Displays: "10/29/2000 10:57:30 AM"
MsgBox Month(Now) ' Displays: "10"
MsgBox MonthName(Month(Now)) ' Displays: "October"
MsgBox Day(Now) ' Displays: "29"
MsgBox WeekdayName(Weekday(Now)) ' Displays: "Sunday"
MsgBox Year(Now) ' Displays: "2000"
MsgBox Hour(Now) ' Displays: "10"
MsgBox Minute(Now) ' Displays: "57"
MsgBox Second(Now) ' Displays: "30"
These functions work with any Date data type. Don't know if they're useful to you for what you're doing, but they are good to know. You can do more with the Format function that TheOnly suggested.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|