Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that picks up a date in cell and adds a month to it. Now I
need to take the first date it picked up and create two new variables using that date. The first variable I need is to simply pick out the year from the first date Ie if FirstDate = 3/1/2006, I need myYear to be "2006". The second variable I need to set is the FirstDate in YYYY_MM format, ie "2006_03". How do you convert the date to these two formats? I've tried myYear = FirstDate(format, "YYYY") but get "Argument not optional" and myYear = FirstDate&format("YYYY") but get "Syntax error" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I convert US date with 12hr format to European date 24hr | Excel Discussion (Misc queries) | |||
Is it possible to convert solar date to lunar date using excel? | Excel Discussion (Misc queries) | |||
How to convert Gregorian date into Hijri Date in Excel 2007? | Excel Discussion (Misc queries) | |||
Convert a julian gregorian date code into a regular date | Excel Worksheet Functions | |||
Convert date to length of time in months from set date | Excel Worksheet Functions |