Imports System
Imports System.IO
Imports System.Text
Public Class Test
Public Shared Sub Main()
Try
Dim dt As DateTime = Directory.GetCreationTime(Environment.CurrentDirectory)
If (DateTime.Now.Subtract(dt).TotalDays > 364) Then
Console.WriteLine("This directory is over a year old.")
ElseIf (DateTime.Now.Subtract(dt).TotalDays > 30) Then
Console.WriteLine("This directory is over a month old.")
ElseIf (DateTime.Now.Subtract(dt).TotalDays <= 1) Then
Console.WriteLine("This directory is less than a day old.")
Else
Console.WriteLine("This directory was created on {0}.", dt)
End If
Catch e As Exception
Console.WriteLine("The process failed: {0}", e.ToString())
End Try
End Sub
End Class