Click here to Skip to main content
15,927,514 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: shape drawing and coordinations Pin
DaveAuld15-May-10 5:31
professionalDaveAuld15-May-10 5:31 
GeneralRe: shape drawing and coordinations Pin
tuolesi15-May-10 6:37
tuolesi15-May-10 6:37 
GeneralRe: shape drawing and coordinations Pin
DaveAuld15-May-10 6:42
professionalDaveAuld15-May-10 6:42 
GeneralRe: shape drawing and coordinations Pin
tuolesi15-May-10 7:03
tuolesi15-May-10 7:03 
GeneralRe: shape drawing and coordinations Pin
tuolesi17-May-10 5:25
tuolesi17-May-10 5:25 
AnswerRe: shape drawing and coordinations Pin
Luc Pattyn15-May-10 6:39
sitebuilderLuc Pattyn15-May-10 6:39 
QuestionAxDtPicker problems oleDate is invalid [modified] Pin
QuickBooksDev15-May-10 4:20
QuickBooksDev15-May-10 4:20 
AnswerRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt17-May-10 2:36
Johan Hakkesteegt17-May-10 2:36 
By the sound of it, you are using a third party date time picker, are you, or is AxMSComCtl2.AxPickter simply what you named it?

If it is .Net's regular DateTimePicker control. Without seeing more specific code, I would guess the problem can be found in the conversion from a date value to a string value and back. Especially converting a string to a date value is always risky.

You could try the following things:
1. enclose the relevant code in Try Catch blocks with MsgBox(ex.ToString), and/or set a break point and walk through the code line by line, to see what value is actually being passed to whatever it is that is expecting a datetime value. You may see yyyy/MM/dd in your GUI, but the code may try to pass yyyy/dd/MM (for example)
2. do not use cstr(frm.dtpFromLast.value), but rather frm.dtpFromLast.value.ToShortDate.
3. look into IFormatProvider. (Example: Public Finn As IFormatProvider = New Globalization.CultureInfo("fi-FI")). Your Windows regional settings determine the format of the date in your dtp control (yyyy/MM/dd or dd-MM-yyyy or yyyy/dd/MM, etc.). When you convert it to string, and then back to a date, it may not necessarily translate correctly.
4. "oledate" suggests that this app is sending these dates to a database. Databases are notoriously sensitive to all kinds of date format problems. You may have to check what format your database is expecting, and form your date accordingly. Also sticking with pure datetime values, instead of converting to string and back, will prevent a lot, if not all, of your problems.
5. If you insist on converting dates to strings and back, use frm.dtpFromLast.value.ToShortDate and cDate(frm.dtpFromLast.value.ToShortDate).Date
My advice is free, and you may get what you paid for.

GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev17-May-10 8:35
QuickBooksDev17-May-10 8:35 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt17-May-10 22:07
Johan Hakkesteegt17-May-10 22:07 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev19-May-10 7:11
QuickBooksDev19-May-10 7:11 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt19-May-10 22:47
Johan Hakkesteegt19-May-10 22:47 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev20-May-10 0:56
QuickBooksDev20-May-10 0:56 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt20-May-10 1:07
Johan Hakkesteegt20-May-10 1:07 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev20-May-10 3:33
QuickBooksDev20-May-10 3:33 
AnswerRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev17-May-10 9:45
QuickBooksDev17-May-10 9:45 
GeneralRe: AxDtPicker problems oleDate is invalid [modified] Pin
QuickBooksDev19-May-10 10:51
QuickBooksDev19-May-10 10:51 
GeneralRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev20-May-10 1:57
QuickBooksDev20-May-10 1:57 
GeneralRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev20-May-10 3:51
QuickBooksDev20-May-10 3:51 
GeneralRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev21-May-10 0:48
QuickBooksDev21-May-10 0:48 
Questionquery .db databases Pin
Jack_1815-May-10 2:01
Jack_1815-May-10 2:01 
AnswerRe: query .db databases Pin
DaveAuld15-May-10 3:13
professionalDaveAuld15-May-10 3:13 
AnswerRe: query .db databases Pin
DaveAuld15-May-10 3:17
professionalDaveAuld15-May-10 3:17 
GeneralRe: query .db databases Pin
Jack_1815-May-10 8:20
Jack_1815-May-10 8:20 
GeneralRe: query .db databases Pin
DaveAuld15-May-10 8:22
professionalDaveAuld15-May-10 8:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.