Hello everyone, the type period that serves to work with dateutils in b4i doesn't work?
whenever I put it in the code, b4i returns an error
B4i Version: 7.80
Private Root As B4XView
Type Period (Years As Int, Months As Int, _
Days As Int, Hours As Int...
Must be missing something simple... "9" is not the correct number of days between 7/1/2021 and 12/10/2021
Dim DateSobriety As String = iMap.Get("datesobriety") ' this is 2021-07-01 in database
DateTime.DateFormat = "yyyy-MM-dd"
Dim StartTime As Long =...
I have a problem with DateUtils.AddPeriod and DST which is In the USA today November, 7 2021
Here is my code
Private Sub GetStrTo(strFrom As String, AddHour As Int) As String
Dim Arr() As String
Dim NotTimeDate As String,NoteTimeStr As String...
can certainly still be optimized.
Private Sub isCurrentMonth(ticks As Long) As Boolean
Return DateTime.GetYear(ticks) = DateTime.GetYear(DateTime.Now) And DateTime.GetMonth(ticks) = DateTime.GetMonth(DateTime.Now)
Private Sub isSameYear(ticks_1 As Long,ticks_2 As Long) As...
to check the DateUtils.SetDateAndTime2 timestamp,
I had trying that code :
'for the datetime = 08/05/2019 14:43:00
Dim mats As Long = DateUtils.SetDateAndTime2(2019, 8, 5, 14, 43, 0, 1) 'with UTC/GMT + 1
Log(mats) 'return : 1565012580000
Dim MyDate As Long =...
Using the code below, is there a way to have GetHour and GetMinute display a "0" in front of the string if the returned value is less than 10? If the converted hours = "9" for 9 in the morning, I would like the returned string to have "09" in it.
Dim strMyTimeString As String...
adpUserBirth is an AnotherDatePicker:
Sub adpUserBirth_DateChanged (NewDate As Long)
DateTime.DateFormat = "MM/dd/yyyy" ' just to be sure
Dim PerDiff As Period
PerDiff = DateUtils.PeriodBetween(NewDate, DateTime.Now)
Log("New date: " & DateTime.Date(NewDate))
Log("Today : "...
Using the latest DateUtils library, 1.05.
Running this code:
Dim lDate As Long
lDate = DateUtils.SetDate(1970,1,1)
I expect this to produce 0, but instead I get 3600000
Any idea what I might be doing wrong?