|
-
Mar 28th, 2007, 04:33 AM
#1
Thread Starter
Lively Member
[RESOLVED] DateSeperator in VBA
Hi,
Does anyone know the VBA equivalent of the "DateSeparator" function in VB6 which differentiates years, months and days of a date?
Thanks.
-
Mar 28th, 2007, 04:35 AM
#2
New Member
Re: DateSeperator in VBA
how about:
sDay = Day(MyDate)
sMonth = Month(MyDate)
sYear = Year(MyDate)
-
Mar 28th, 2007, 06:00 AM
#3
Re: DateSeperator in VBA
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.
...
...
...
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 31st, 2007, 04:07 PM
#4
Thread Starter
Lively Member
Re: DateSeperator in VBA
Cheers,
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|