View Single Post
  #1   Report Post  
 
Posts: n/a
Default GETTING MONTH FROM A DATE

ei guys,

can anybody help me with this. I have this macros where it gets the
current date when it runs and gets the month and year only. Is this
possible? To just format the date and have it just show the month and
year? coz when use this:


Dim DateToday As String
DateToday = Date
Selection.Value = DateToday
Selection.NumberFormat = "mmm yyyy"
Selection.Formula = Selection.Value
ActiveCell.Offset(0, 1).Select

It just changes the value you'll see:

eg.

when you look at the worksheet you'll be able to see

"Sep 2005"

but when you select that cell it shows on the "bar"

"09/29/2005" [this is the exact date i run the macro]


can anyone help me pls...i need this by fri, and i really cant find any
solution on the net.



thanks man!