A acedashdog Member Licensed User Longtime User Oct 18, 2011 #1 This is, I hope, just a 'how to' question. I have an application in B4PPC that (among other things) captures a date from a calendar control. It stores its' data in a plain ol' text file, writing this data like so: FileWrite(c1,calendarcreated.Value) Click to expand... which of course creates a whopping great string of numbers, the ticks value. Now, I'm writing its' brother in B4A, and I need it to eat and dump the same files. How do I convert the ticks value I read in to a date? datetime.date(tempcreated) doesn't work. Also, have I missed something, or is there no Calendar control in B4A? An odd omission if there isn't...
This is, I hope, just a 'how to' question. I have an application in B4PPC that (among other things) captures a date from a calendar control. It stores its' data in a plain ol' text file, writing this data like so: FileWrite(c1,calendarcreated.Value) Click to expand... which of course creates a whopping great string of numbers, the ticks value. Now, I'm writing its' brother in B4A, and I need it to eat and dump the same files. How do I convert the ticks value I read in to a date? datetime.date(tempcreated) doesn't work. Also, have I missed something, or is there no Calendar control in B4A? An odd omission if there isn't...
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2011 #2 There is a date dialog in the dialogs library: http://www.b4x.com/forum/additional-libraries-official-updates/6776-dialogs-library.html You should also try this one: A Windows like DatePicker (DateDialog) About the conversion. Try this: Code: Copy Dim b4p, b4a As Long b4p = File.ReadString(...) b4a = (b4p - 621355968000000000) / 10000 I haven't tested it myself. Upvote 0
There is a date dialog in the dialogs library: http://www.b4x.com/forum/additional-libraries-official-updates/6776-dialogs-library.html You should also try this one: A Windows like DatePicker (DateDialog) About the conversion. Try this: Code: Copy Dim b4p, b4a As Long b4p = File.ReadString(...) b4a = (b4p - 621355968000000000) / 10000 I haven't tested it myself.