| | |
converting date from form to field in access
Thread Solved |
•
•
Join Date: Sep 2007
Posts: 70
Reputation:
Solved Threads: 0
Hi
I have used three combo box in VB 6 form one for selecting date one for month and one for year. If the selection is say 12/07/2007 then I need it to be converted as 12/07/2007 under one field i.e date field of access database. So how can I do this.
For ref. combo1 is for date,combo2 is for month and combo3 is for year
and date is the field in database
table name is mm
database name is nn
Will any one help me by writing the necessary code.
(K.S.)
I have used three combo box in VB 6 form one for selecting date one for month and one for year. If the selection is say 12/07/2007 then I need it to be converted as 12/07/2007 under one field i.e date field of access database. So how can I do this.
For ref. combo1 is for date,combo2 is for month and combo3 is for year
and date is the field in database
table name is mm
database name is nn
Will any one help me by writing the necessary code.
(K.S.)
•
•
Join Date: Oct 2007
Posts: 11
Reputation:
Solved Threads: 1
•
•
•
•
Hi
I have used three combo box in VB 6 form one for selecting date one for month and one for year. If the selection is say 12/07/2007 then I need it to be converted as 12/07/2007 under one field i.e date field of access database. So how can I do this.
For ref. combo1 is for date,combo2 is for month and combo3 is for year
and date is the field in database
table name is mm
database name is nn
Will any one help me by writing the necessary code.
(K.S.)
Take three strings. Likewise strday = cmbday.text , strmonth = cmbmonth.text , stryear = cmbyear.text and While inserting in the database use this
(to_date('" & strday & "','dd-mm-yyyy') & to_date('" & strmonth & "','dd-mm-yyyy') & ('" & stryear & "','dd-mm-yyyy')
Try this in your inserting query and you have to try it.
![]() |
Similar Threads
- COnverting date time in windows to unix timestamp (C#)
- How to open multiple textfile (Visual Basic 4 / 5 / 6)
- Date fields imported from access file to excel spreadsheet is converting to number (Visual Basic 4 / 5 / 6)
- Access Date & Time Validation Question (MS Access and FileMaker Pro)
- Trying to return query results (ColdFusion)
- Date of Birth field need help (ASP.NET)
- Unique field/primary key for Access (Visual Basic 4 / 5 / 6)
- Help with Class, stuck. (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: find the error pls...
- Next Thread: Making a Quiz on VB using ADO and access 2003
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






