Results 1 to 7 of 7

Thread: Converting days to yy/mm/dd (Resolved)

Threaded View

  1. #1

    Thread Starter
    PowerPoster SuperSparks's Avatar
    Join Date
    May 2003
    Location
    London, England
    Posts
    265

    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:
    1. 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
  •  



Click Here to Expand Forum to Full Width