If you change your short date format to D/M/YYYY your problem will go away. A better method is to format dates D/MMM/YYYY. That way there is NO ambiguity in the date values
Matt ----- Original Message ----- From: "Chintan Shah" <[EMAIL PROTECTED]> To: "VBHelp" <[email protected]> Sent: Wednesday, June 01, 2005 11:40 PM Subject: [vbhelp] MS Flexgrid problem > Hi Friends, > > I developed small software in VB 6 and Sql Server 2000. > I have a problem in date saving in sql database from flexgrid. > When i save the data from flexgrid to Database, my date format changed. > I saw the date in dd/mm/yyyy (01/06/2005 (1st june 2005) ) format in Flexgrid. > but when i save the data, it save as 06/01/2005 (6th jan 2005). > When i get data for edit it shows me like 06/01/2005 (6th jan 2005). > This will only happend for 1st to 12 date, from 13th it store perfect. > My code to save data are like this : > CSQL = "INSERT INTO Tmp(Srno, EntDate) " > CSQL = CSQL & " VALUES('" & Trim(txtSRNo.Text) & "','" & Format(MSF1.TextMatrix(iCount, VEntdt), "MM/dd/yyyy") & "')" > > My system date in Regional settings are : > English (United states) > and Date format are : > Short Date style : M/d/y > > Pl. help me to store the correct data. > > > > > > Regards, > > Chintan Shah > > > --------------------------------- > Free antispam, antivirus and 1GB to save all your messages > Only in Yahoo! Mail: http://in.mail.yahoo.com > > [Non-text portions of this message have been removed] > > > > > > > > '// ======================================================= > Rules : http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > ======================================================= > Post : [email protected] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// ======================================================= > > Yahoo! Groups Links > > > > > > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.322 / Virus Database: 267.2.0 - Release Date: 27/5/05 > > '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
