Android Question Date

omoba

Active Member
Licensed User
Longtime User
I have the dates of the month stored in an excel file (syntax --8/1/2015, 8/2/2015 ....8/312015).

When I try to retrieve the date from the excel file using Table1.GetValue(0,i), I get the the date as 8/1/15, which is not good for me.

I am trying to compare DateTime.date(now) with the date records in the excel file

Since DateTime.date(now) gives 8/20/2015 and Table1.GetValue(0,i) gives 8/20/15, I never get a state where date now is equal to stored data in excel file.

Please any advice, I believe there is an easy way compared to my wild tries which are not working either
 
1. Change your excel file to format the date to long values... I dont mean LONG object. I mean. showing the date in long format. dd/MM/yyyy
2. Configure datetime.Dateformat to the format you want to parse/use
3. Use Dateutil.ParseDate to parse such a excel date into a b4a long value
 
Upvote 0
Back
Top