468,119 Members | 1,972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

storing data and time in datetime field

I am using MS Sql Express as the backend database for a Microsoft Access
front end application.

I am using a calendar control to store the desired date in the sql datetime
field. The time portion of the field defaults to 12:00am.

What I want is to also store the time in the same datetime field as the
date, but I want to use a separate control from the calendar control. I.e. I
want the user to choose the date from the calendar control, then select the
time from a different control, but have both the date and time stored in the
single datetime field of the SQL database.

So far, I can't get the time to concatenate with the date properly.

Any ideas?

Thanks,

John Tindall
Jan 16 '07 #1
3 5018
john wrote:
I am using MS Sql Express as the backend database for a Microsoft
Access front end application.

I am using a calendar control to store the desired date in the sql
datetime field. The time portion of the field defaults to 12:00am.

What I want is to also store the time in the same datetime field as
the date, but I want to use a separate control from the calendar
control. I.e. I want the user to choose the date from the calendar
control, then select the time from a different control, but have both
the date and time stored in the single datetime field of the SQL
database.
So far, I can't get the time to concatenate with the date properly.

Any ideas?

Thanks,

John Tindall
What are you trying? You should be able to just add them.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 16 '07 #2
Hello Rick,

Thanks for the reply. When I was trying to add the time, it was incrementing
the days, but it working now.
Now I just need to use access to display the long date (rather than general
date) as well as the time in the date field.

Thanks,
John

"Rick Brandt" <ri*********@hotmail.comwrote in message
news:7p******************@newssvr13.news.prodigy.n et...
john wrote:
>I am using MS Sql Express as the backend database for a Microsoft
Access front end application.

I am using a calendar control to store the desired date in the sql
datetime field. The time portion of the field defaults to 12:00am.

What I want is to also store the time in the same datetime field as
the date, but I want to use a separate control from the calendar
control. I.e. I want the user to choose the date from the calendar
control, then select the time from a different control, but have both
the date and time stored in the single datetime field of the SQL
database.
So far, I can't get the time to concatenate with the date properly.

Any ideas?

Thanks,

John Tindall

What are you trying? You should be able to just add them.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Jan 18 '07 #3
john wrote:
Hello Rick,

Thanks for the reply. When I was trying to add the time, it was
incrementing the days, but it working now.
Now I just need to use access to display the long date (rather than
general date) as well as the time in the date field.
That is controlled by the format property on forms and reports.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 18 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Robert | last post: by
12 posts views Thread by pmud | last post: by
6 posts views Thread by Jon Davis | last post: by
4 posts views Thread by John A Grandy | last post: by
15 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.