By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,534 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

storing data and time in datetime field

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.