Hi,
Does anyone know the VBA equivalent of the "DateSeparator" function in VB6 which differentiates years, months and days of a date?
Thanks.
Printable View
Hi,
Does anyone know the VBA equivalent of the "DateSeparator" function in VB6 which differentiates years, months and days of a date?
Thanks.
how about:
sDay = Day(MyDate)
sMonth = Month(MyDate)
sYear = Year(MyDate)
There is no "DateSeparator" type function in VB 6. Can you clarify what the results are that you are trying to get?
There are several date/time functions, one of which is DateDiff where you can pass the interval of days/weeks/months/years for calculation of the difference.
There is Day/Month/Year like weetobix posted.
There is the Format command for if you need to format the date with just part or in a certain mm/dd/yyyy, dd/mm/yyyy, etc format.
...
...
...
Cheers,
Thanks for your help.