ciginfo Well-Known Member Licensed User Longtime User Jul 9, 2011 #1 Bonjour, Excuse my bad english, i'm french. I want to add 9 months to a date given by a DateDialog Here my code (wrong) and impossible to find the true Dim Dd As a DateDialog Dim dateDG, DateTerme As Long Dim TermeLbl As Label dateDG = Dd.DateTicks DateTerme = DateTime.Add(DateTime.date(dateDG), 0, 9, 0) TermeLbl.Text = DateTime.Date(DateTerme) Thank you if anybody give me the soluce François
Bonjour, Excuse my bad english, i'm french. I want to add 9 months to a date given by a DateDialog Here my code (wrong) and impossible to find the true Dim Dd As a DateDialog Dim dateDG, DateTerme As Long Dim TermeLbl As Label dateDG = Dd.DateTicks DateTerme = DateTime.Add(DateTime.date(dateDG), 0, 9, 0) TermeLbl.Text = DateTime.Date(DateTerme) Thank you if anybody give me the soluce François
klaus Expert Licensed User Longtime User Jul 9, 2011 #2 Bonjour François. Le code doit être le suivant: B4X: dateDG = Dd.DateTicks DateTerme = DateTime.Add(dateDG, 0, 9, 0) TermeLbl.Text = DateTime.Date(DateTerme) Meilleures salutations. Upvote 0
Bonjour François. Le code doit être le suivant: B4X: dateDG = Dd.DateTicks DateTerme = DateTime.Add(dateDG, 0, 9, 0) TermeLbl.Text = DateTime.Date(DateTerme) Meilleures salutations.
ciginfo Well-Known Member Licensed User Longtime User Jul 9, 2011 #3 Parfait, ça fonctionne correctement. Merci beaucoup François Upvote 0
cirollo Active Member Licensed User Longtime User Nov 27, 2011 #4 it doesn't work for me! Hi I would like to add 123 days to a date picked by date dialog. tried dateDG = Dd.DateTicks DateTerme = DateTime.Add(dateDG, 0, 0, 123) TermeLbl.Text = DateTime.Date(DateTerme) but it doesn't work! strange is that if i put DateTerme = DateTime.Add(datetime.now, 0, 0, 123) seems to work?!?!?! any hint???? thanks ciro Upvote 0
it doesn't work for me! Hi I would like to add 123 days to a date picked by date dialog. tried dateDG = Dd.DateTicks DateTerme = DateTime.Add(dateDG, 0, 0, 123) TermeLbl.Text = DateTime.Date(DateTerme) but it doesn't work! strange is that if i put DateTerme = DateTime.Add(datetime.now, 0, 0, 123) seems to work?!?!?! any hint???? thanks ciro
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2011 #5 Which value is returned? What is the value of: B4X: Log(DateTime.Date(dateDG)) Upvote 0
cirollo Active Member Licensed User Longtime User Nov 27, 2011 #6 ok, solved Hi Erel! now it works, my mistake! just a question, date format in adroid is always with "." or can be used also "/" or "-" between day,month,year? Upvote 0
ok, solved Hi Erel! now it works, my mistake! just a question, date format in adroid is always with "." or can be used also "/" or "-" between day,month,year?
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2011 #7 You can change it with DateTime.DateFormat. Upvote 0