Does anyone know how to get android system's date and time, to be show in a label ?
My code is :
Dim now As Long
Dim dt As String
DateTime.DateFormat = "dd MMM yyyy"
dt = DateTime.Date(now)
DateTime.DateFormat = "hh:mm:ss"
dt = dt & CRLF & DateTime.Time(now)
Label4.Text = dt
Label4 is always showing 01-01-1970 07:00:00 , I'm expect it shows 07-Mar-2012 12:35.
Dim now As Long
Dim M, H As String
DateTime.DateFormat = "dd MMM yyyy"
Label4.Text = DateTime.Date(DateTime.now)
'Because I don't know how to make DateFormat = "hh:mm",
'when I set like that, it is always shown seconds too.
'So I use this code :
H = DateTime.GetHour(DateTime.Now)
M = DateTime.GetMinute(DateTime.Now)
Label5.Text = H & ":" & M