|
-
Feb 4th, 2004, 01:12 AM
#1
Thread Starter
Addicted Member
toughest general question ever(date/time picker)!
i am using MS ACCESS as my database and a date/time picker. the problem is if the value of the date/time picker is at 12:00:00 the it returns only the date.
i.e
if the value of btpTo is 01/01/2004 12:00:00 am it only retuns 01/01/2004 which is the date. the problem is i nee to get the exact date/time. any one has an idea on this?! hehehe
to be clear.
my database has:
fieldname: mydt
data type: date/time format: general date
my code in VB:
VB Code:
rs.open "select * from myDB where id = 1",cn,1,1
rs.addnew
rs!mydt = "12/12/2004 12:00:00 am"
rs.update
result when saved into dbase.
mydt(fieldname)
12/12/2004
time is missing! it should be 12/12/2004 12:00:00 am
Last edited by titan7262; Feb 4th, 2004 at 04:15 AM.
-
Feb 4th, 2004, 01:33 AM
#2
PowerPoster
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Feb 4th, 2004, 01:39 AM
#3
Thread Starter
Addicted Member
sorry for the comment about ms access. what i mean is that i am having problems with datetimepicker. if the date is 01/01/2004 12:00:00 am it only returns 01/01/2004 time is missing what can i do
-
Feb 4th, 2004, 01:51 AM
#4
Addicted Member
As we know "01/01/2004 12:00:00" and "01/01/2004" are one and the same. Whats your porblem if it does not return time then?
-
Feb 4th, 2004, 01:54 AM
#5
PowerPoster
You could just fill in the blank. See if the time is there, if it's not then add 12:00:00 to the string.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Feb 4th, 2004, 02:07 AM
#6
Thread Starter
Addicted Member
i need the whole values in my report. it's not a good idea if i just give the date and not time.
-
Feb 4th, 2004, 02:18 AM
#7
Addicted Member
try this
VB Code:
MsgBox Format(DTPicker1.Value, "MM/DD/YYYY HH:MM:SS AM/PM")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|