Hi,
It is me again with the date format...
I have this problem and i am not able to resolve it...
There are some fields and combo box that the user has to fill...And then i am introducing this info in the database (SQLite)...
One of this fields is the date (and in this format dd/mm/yyyy).
So the INSERT INTO is working well and i can see the data in the database as i want ( included the date format).
Then if i made one SELECT is working well too...So i can see for examples the next values of dates: 01/06/2014 or 25/05/2014 or 13/05 /2014...
So i can see the values as i expected.
But then, i am not able to work well with them...
I make one SELECT * FROM MyTable Where name='John'
The value date of what this SELECT returned i put it in the variable tDate
so if i make answer tDate i can see for example 01/06/2014
then i make one convert tDate to system date
And then another convert tDate to dateitems
and if now i make one answer of tDate i have this: 2014,6,1,0,0,0,1
if i add 7 days to this i obtain 2014,6,8,0,0,0,1 --I used this instruction: add 7 to item 3 of tDate
So till this moment it is working as i expected.
But, in the next case the date i obtain from the new SELECT is 25/05/2014...So:
if i make answer tDate i can see for example 25/05/2014
then i make one convert tDate to system date
And then another convert tDate to dateitems
and if now i make one answer of tDate i have this: 25/05/2014 --*****************IS NOT CONVERTING WELL****************
if i add 7 days to this i obtain25/05/2014,,7 --I used this instruction: add 7 to item 3 of tDate
And in the third case the value of date is 02/05/2014
so if i make answer tDate i can see for example 02/05/2014
then i make one convert tDate to system date
And then another convert tDate to dateitems
and if now i make one answer of tDate i have this: 2014,5,2,0,0,0,6 --*********HERE IS MAKING IT CORRECT AGAIN*************
if i add 7 days to this i obtain 2014,5,9,0,0,0,6 --I used this instruction: add 7 to item 3 of tDate
IT IS WORKING WELL ONLY WHEN THE DAY NUMBER HAS A VALUE BETWEEN 1 AND 12 ( As if it is the month )...
But what is strange is that is not taking it as a month, because then is adding correctly the number of days ( 7 in this case ) to the days item...
Because if not in the 01/06/2014, is returning me 08/06/2014 and not adding it to the item '06' ( the month of my date) and not a wrong date ( or at least an unexpected date )...
I hope i explained well my problem with dates...
What am i doing wrong?
Why is not converting well the value from the database (25/05/2014) to dateitems????
regards,
fko