P peggjones Active Member Licensed User Longtime User Dec 31, 2013 #1 Hi All I'm having a problem with the following line of code date1 = assetsheet.GetCellValue(1, i) - the cell contains 30/12/2013 When I run my program on one of my devices this value is changed to 12/30/13 on the other it remains 30/12/2013. date1 is defined as string. The date setting is dd/mm/yyyy on both devices. Any ideas?
Hi All I'm having a problem with the following line of code date1 = assetsheet.GetCellValue(1, i) - the cell contains 30/12/2013 When I run my program on one of my devices this value is changed to 12/30/13 on the other it remains 30/12/2013. date1 is defined as string. The date setting is dd/mm/yyyy on both devices. Any ideas?
LucaMs Expert Licensed User Longtime User Dec 31, 2013 #2 peggjones said: Hi All I'm having a problem with the following line of code date1 = assetsheet.GetCellValue(1, i) - the cell contains 30/12/2013 When I run my program on one of my devices this value is changed to 12/30/13 on the other it remains 30/12/2013. date1 is defined as string. The date setting is dd/mm/yyyy on both devices. Any ideas? Click to expand... may be dd/MM/yyyy? month in uppercase? Upvote 0
peggjones said: Hi All I'm having a problem with the following line of code date1 = assetsheet.GetCellValue(1, i) - the cell contains 30/12/2013 When I run my program on one of my devices this value is changed to 12/30/13 on the other it remains 30/12/2013. date1 is defined as string. The date setting is dd/mm/yyyy on both devices. Any ideas? Click to expand... may be dd/MM/yyyy? month in uppercase?
Erel B4X founder Staff member Licensed User Longtime User Dec 31, 2013 #3 What is the excel field type? Try to set the default locale with this code: B4X: Dim jLocale As JavaObject jLocale.InitializeStatic("java.util.Locale") Dim usLocale As JavaObject = jLocale.GetField("US") jLocale.RunMethod("setDefault", Array As Object(usLocale)) Upvote 0
What is the excel field type? Try to set the default locale with this code: B4X: Dim jLocale As JavaObject jLocale.InitializeStatic("java.util.Locale") Dim usLocale As JavaObject = jLocale.GetField("US") jLocale.RunMethod("setDefault", Array As Object(usLocale))