Hello,
I have Date time components (year-month-day) and I want to compose a string to make a file name i.e. 2016\10\18 >> 20161018.DAT then use SD object to save data. I used joinstrings but it makes program to crash and start over, i tried to put date components into array but i could not pass it to SD object!! any ideas?
Thanks
I have Date time components (year-month-day) and I want to compose a string to make a file name i.e. 2016\10\18 >> 20161018.DAT then use SD object to save data. I used joinstrings but it makes program to crash and start over, i tried to put date components into array but i could not pass it to SD object!! any ideas?
Thanks
B4X:
Dim currenttime As DSTime
currenttime = DS1302.CurrentTime
Years = currenttime.years
Months = currenttime.Months
DayOfMonth = currenttime.DayOfMonth
B4X:
Dim filename As String
Dim DateTimeString As String = JoinStrings(Array As String(NumberFormat(Years,4,0),NumberFormat(Months,2,0),NumberFormat(DayOfMonth,2,0)))
filename =JoinStrings(Array As String("dbase/",DateTimeString,".db"))
B4X:
FileNameArr =(Array As String("dbase/",NumberFormat(Years,4,0),NumberFormat(Months,2,0),NumberFormat(DayOfMonth,2,0),".db"))
Last edited: