1. M

    Android Question Show time picker dialog

    Hi everyone, there is a way to show this native-looking dialog to choose a time with B4A? From: Or something like: Thanks in advance!
  2. S

    Android Question DateTime.Now

    Hello, Would like to know how DateTime.Now arrives the value in B4A and B4J. Does it takes the value from computer? Does it requires any internet connection to fetch value from somewhere? Changing the computer system's Date and Time, In B4A, it returns the correct value. Then...
  3. A

    Android Question Is it safe to do like this?

    Hi all and happy 2021. I'm run into the problem (yes, I know, my fault). The problem is that I saved date into my table like this 05/05/2020. For the whole year it was OK but this morning I realized that I did it wrong. When I run a query like this select * from mytable where jobdate between...
  4. amorosik

    B4J Question String to DatePicker field - how to convert string to DatePicker field ?

    On a B4Xpage we have two DatePicker field txtFromDate and txtToDate How to set these field from code, having a date like a string value? txtFromDate.DateTicks = ??? Wich function that return a DateTicks from a string (example "14/09/2020") ?
  5. S

    Bug? Datetime BUG ?

    DateTime.DateFormat="YYYY-MM-dd" Log (DateTime.DateParse( "2020-08-16")) Log (DateTime.DateParse( "2020-08-21")) The Log says : 2020-08-16 = 1577660400000 2020-08-21 = 1577660400000 both results are the same... ?
  6. Alexander Stolte

    Android Code Snippet [B4X] isCurrentMonth, isSameYear, isSameWeek, isLastWeek

    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) End Sub Private Sub isSameYear(ticks_1 As Long,ticks_2 As Long) As...
  7. Alexander Stolte

    Android Code Snippet [B4X] convert seconds to ticks

    Sub convert_seconds2Ticks(seconds As Long) As Long seconds = seconds * DateTime.TicksPerSecond 'convert seconds to ticks! Return seconds End Sub
  8. Jack Cole

    Android Question Time formatting problem

    I'm trying to convert a 24 hour time to 12 hour with AM/PM. I've tried to use the documentation for date/time formats. Here's my code: Dim TimeString as String = "21:00" DateTime.DateFormat="HH:mm" Dim TimeValue=DateTime.TimeParse(TimeString&":00") as Long DateTime.DateFormat= "h:mm a"...
  9. Star-Dust

    B4A Library [B4X] [XUI] SD DiscTimePicker (parking meter - DateTimePicker)

    (Here for iOS version) SD_DiscTimePicker Author: Star-Dust Version: 0.03 DiscTimePicker Events: Change (DateTimeChange As Long) Functions: Class_Globals As String DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String Base type must be Object Initialize (Callback As...

    Android Question Date Formatting

    Hello guys, I know this been discussed here quite a few times, but I still am unable to format an SQL date field as I desire, it keeps showing me the date as yyyy-mm-dd... I tried the following code and the result is always the same: yyyy-mm-dd DateTime.DateFormat = "dd/MM/yyyy" wDataEvento...
  11. fredo

    Android Code Snippet Create SQLite field with default "date now" in milliseconds

    DDL code: [entrCreate] INT NOT NULL DEFAULT (strftime('%s','now') *1000) Make sure that the expression (strftime('%s','now') *1000) is enclosed in brackets.