This is a visual basic 6.0 source code function that returns the date and time in different formats. It returns Full Date, Short Date and in different formats.

'*******************************************************
'*     MYCPLUS Sample Code - https://www.mycplus.com     *
'*                                                     *
'*   This code is made available as a service to our   *
'*      visitors and is provided strictly for the      *
'*               purpose of illustration.              *
'*                                                     *
'* Please direct all inquiries to saqib at mycplus.com *
'*******************************************************

Public Function FormatDateTime() As Text

	Dim FDateTime As String
	FDateTime = " "
	FDateTime = FDateTime &  Format(Now, "long time") & VBNewLine
	FDateTime = FDateTime &  Format(Now, "short time") & VBNewLine
	FDateTime = FDateTime &  Format(Now, "medium time") & VBNewLine
	FDateTime = FDateTime &  Format(Now, "general date") & VBNewLine
	FDateTime = FDateTime &  Format(Now, "long date") & VBNewLine
	FDateTime = FDateTime &  Format(Now, "medium date") & VBNewLine
	FDateTime = FDateTime &  Format(Date, "dd - mm - yyyy") & VBNewLine
	FDateTime = FDateTime &  Format(Date, "dd/mm/yy") & VBNewLine
	FDateTime = FDateTime &  Format(Date, "dd/mm/yyyy") & VBNewLine
	FDateTime = FDateTime &  Format(Date, "dd/mm") & VBNewLine
	FDateTime = FDateTime &  Format(Date, "dd") & VBNewLine
	FDateTime = FDateTime &  Format(Time, "hh-mm-ss") & VBNewLine
	FDateTime = FDateTime &  Format(Time, "hh.mm.ss") & VBNewLine
	FDateTime = FDateTime &  Format(Time, "hh-mm") & VBNewLine

	FormatDateTime = FDateTime

End Function