?
Solved

VB 6 Get Date and Year ( Urgent )

Posted on 2003-02-28
4
Medium Priority
?
135 Views
Last Modified: 2010-05-01
HI
this is an easy one for you guys i think
i need to get the month and year of today

with the date, i need to find out it its : Summer,Spring,Winter,Fall
thats not hard

and then put it in : Dim Date = Fall 2002 ( thats an example )

thx alot
0
Comment
Question by:Italbro4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 140 total points
ID: 8041590
Month(now)
Year(now)

CHeers
0
 
LVL 1

Expert Comment

by:sazhagianambi
ID: 8041659
Hi,

Mon=Format(Now, "MMMM")' Output as February
Yea=Format(Now, "YYYY")' 2003


Regards,
Nambi
0
 
LVL 2

Expert Comment

by:IeuanJ
ID: 8041687
dim myDate
If (month(now) >= 3) and (month(now) <= 5) Then
  myDate = "Spring " & year(now)
elseif (month(now) >= 6) and (month(now) <= 8) Then
  myDate = "Summer " & year(now)
elseif (month(now) >= 9) and (month(now) <= 11) Then
  myDate = "Fall " & year(now)
else
  myDate = "Winter " & year(now)
end if


Remeber Date is a keyword so call it somethgn else e.g. myDate
0
 

Author Comment

by:Italbro4
ID: 8041770
Thx
Fast,easy and good
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question