| re: Textbox Formatting Problem !
Function NumToDate(Num As Long) As Date
Dim DateStg As String, NewDateStg As String
Dim Day As String, Month As String, Year As String
DateStg = Right("0" & CStr(Num), 6)
Day = Right(DateStg, 2)
Month = Mid(DateStg, 3, 2)
Year = Left(DateStg, 2)
NewDateStg = Day & "/" & Month & "/" & Year
NumToDate = CDate(NewDateStg)
End Function
Phil
"Prakash Wadhwani" <simran@omantel.net.om> wrote in message
news:6025a525.0311100954.4c2b59df@posting.google.c om...[color=blue]
> I'm importing & displaying data from a legacy DbaseIII+ system.
>
> There's a Numeric field (6 characters) which displays the date in the
> following manner: yymmdd (stored as a number in the table).
>
> When I'm displaying this in a text box in my form I'd like it to
> display as:
> dd/mm/yy (including the slashes).
>
> Can someone please tell me how to go about this ?
>
> Thx & Best Rgds,
> Prakash[/color] |