Click here to Skip to main content
15,887,336 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: error Pin
OriginalGriff7-Oct-12 5:44
mveOriginalGriff7-Oct-12 5:44 
GeneralRe: error Pin
Richard MacCutchan7-Oct-12 6:39
mveRichard MacCutchan7-Oct-12 6:39 
QuestionSQL Query for dates Pin
SPSandy7-Oct-12 2:17
SPSandy7-Oct-12 2:17 
AnswerRe: SQL Query for dates Pin
Richard MacCutchan7-Oct-12 4:50
mveRichard MacCutchan7-Oct-12 4:50 
AnswerRe: SQL Query for dates Pin
Eddy Vluggen8-Oct-12 2:37
professionalEddy Vluggen8-Oct-12 2:37 
GeneralRe: SQL Query for dates Pin
Johan Hakkesteegt10-Oct-12 23:38
Johan Hakkesteegt10-Oct-12 23:38 
GeneralRe: SQL Query for dates Pin
SPSandy15-Oct-12 4:32
SPSandy15-Oct-12 4:32 
AnswerRe: SQL Query for dates Pin
Eddy Vluggen15-Oct-12 4:54
professionalEddy Vluggen15-Oct-12 4:54 
SPSandy wrote:
But the problem is being new to VB.Net

..that's not a problem, just a matter of time. Next year you'll be explaining the concept to someone else who is new Smile | :)

SPSandy wrote:
I am not able to save the date Value into MySql from a Text Box. Since MySql uses the format yyyy/mm/dd I have tried to convert my date

Databases do not store date's in a specific notation, they store it as a number. Internally, it is just "n" numbers that have passed since januari 1st, 1900, (or some other date) with the time-part stored as a fraction. (Imagine the double 3693.5; that'd be 3693 days since the epoch, and .5 as the time, so probably 12:00 AM)

When you "ask" MySql for a date, it returns a Date type, a double - not a text with month-separators as a string. The problem with using a string, is that the datetime-functions do not know how to interpret it - they see a string, a text, not a datetime.

When you get a value from a textbox, that datetime is in the "users" locale; it's in a specific format, perhaps with daylight saving. You convert that to a "real" DateTime and store it in it's native format. (Otherwise we'd have to teach all the date-functions the differences between timezones and teach them how to read a date in a foreign notation!)

To sum it up; if you have the option of converting the field back to a DateTime, please do so; it'll save you from a lot of headaches in the future. Yes, I can see how it is a workaround for the problem you described, but the price for the trade-off is too high. If you're having trouble making it work, post the code and we'll have a look.
Bastard Programmer from Hell Suspicious | :suss:
if you can't read my code, try converting it here[^]

GeneralRe: SQL Query for dates Pin
SPSandy15-Oct-12 6:05
SPSandy15-Oct-12 6:05 
QuestionConverting fromVB.NET to C Pin
Member 94911027-Oct-12 1:54
Member 94911027-Oct-12 1:54 
AnswerRe: Converting fromVB.NET to C Pin
Wes Aday7-Oct-12 1:57
professionalWes Aday7-Oct-12 1:57 
QuestionAdditional properties or methods into midi form of VB6.0? Pin
Member 24584675-Oct-12 20:37
Member 24584675-Oct-12 20:37 
AnswerRe: Additional properties or methods into midi form of VB6.0? Pin
JR2125-Oct-12 23:14
JR2125-Oct-12 23:14 
GeneralRe: Additional properties or methods into midi form of VB6.0? Pin
Member 24584676-Oct-12 3:54
Member 24584676-Oct-12 3:54 
AnswerRe: Additional properties or methods into midi form of VB6.0? Pin
Eddy Vluggen6-Oct-12 3:50
professionalEddy Vluggen6-Oct-12 3:50 
GeneralRe: Additional properties or methods into midi form of VB6.0? Pin
Member 24584676-Oct-12 4:02
Member 24584676-Oct-12 4:02 
GeneralRe: Additional properties or methods into midi form of VB6.0? Pin
Eddy Vluggen7-Oct-12 1:28
professionalEddy Vluggen7-Oct-12 1:28 
QuestionSecuring application password Pin
Dominick Marciano4-Oct-12 12:26
professionalDominick Marciano4-Oct-12 12:26 
AnswerRe: Securing application password Pin
Richard MacCutchan4-Oct-12 21:54
mveRichard MacCutchan4-Oct-12 21:54 
AnswerRe: Securing application password Pin
David Mujica5-Oct-12 3:11
David Mujica5-Oct-12 3:11 
AnswerRe: Securing application password Pin
Dominick Marciano5-Oct-12 9:58
professionalDominick Marciano5-Oct-12 9:58 
GeneralRe: Securing application password Pin
Richard MacCutchan5-Oct-12 22:40
mveRichard MacCutchan5-Oct-12 22:40 
AnswerRe: Securing application password Pin
Matty2211-Oct-12 17:29
Matty2211-Oct-12 17:29 
GeneralRe: Securing application password Pin
Dominick Marciano11-Oct-12 18:51
professionalDominick Marciano11-Oct-12 18:51 
GeneralRe: Securing application password Pin
Matty2211-Oct-12 19:05
Matty2211-Oct-12 19:05 

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.