|
-
Mar 3rd, 2004, 06:55 PM
#1
Thread Starter
PowerPoster
Converting days to yy/mm/dd (Resolved)
Hi all,
Having had great success with what I thought were going to be the hard bits, I left what I thought was going to be trivially easy till last. I should have known better
VB Code:
Dy = Math.Abs(DateDiff(DateInterval.Day, DateOne, DateTwo))
That nicely gives the result in days. What I want is the result in Years, Months, and Days. I'm just about to give up and write a function or a class to do it, but before I do I want to make sure that I'm not missing some easy way to convert days into Y,M,D. I've been through MSDN Library looking at Date, DateTime, TimeSpan, DatePart until my eyes glazed over, but I can't figure out an easy way of doing it.
Any ideas?
Last edited by SuperSparks; Mar 4th, 2004 at 03:22 PM.
Nick.
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
|