• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 138
  • Last Modified:

VB 6 Get Date and Year ( Urgent )

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
Italbro4
Asked:
Italbro4
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Month(now)
Year(now)

CHeers
0
 
sazhagianambiCommented:
Hi,

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


Regards,
Nambi
0
 
IeuanJCommented:
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
 
Italbro4Author Commented:
Thx
Fast,easy and good
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now