Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim a As String ' aquí almacenamos el resultado de la funcion en formato String
Dim b As Long ' esta la utilizamos para convertir el string en número
a=fncGenerarHuella ' Nos devuelve el valor
b=a ' Convertimos a número Long
Msgbox(a,b) ' Mostramos resultados
End Sub
Sub fncGenerarHuella () As String 'Si es string devuelve un valor distinto.
'Genera la huella para añadir en los registros.
Dim datFecha As Long
DateTime.DateFormat = "yyyyMMdd"
DateTime.TimeFormat = "hhmmssSSS"
datFecha = DateTime.Now
Return DateTime.Date(datFecha) & DateTime.Time(datFecha)
End Sub