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

Calendar

P: n/a
I'm working on a calendar-program.
I wonder what the best approach would be for storing the begin- and
end date/time for a particular calendaritem.
Right now I have two fields: Startdate and Enddate. Both date/time.
This is giving me terrible headaches when trying to let the user edit
time-part. Let's say startdate is '01/01/2003 22u15'. When I let the
user edit the 22u15 the datepart is set back to 1899 or something.
It's not the first problem I'm countering wit this one. So I begin to
wonder if it's better to store the startdate for instance in two
fields: startdate and starttime. Both of datatype date/time. Has
anyone got experience on this one? What could be the best approach?
thanks,
--
bebelino

Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
TS

"bebelino" <a.*@c.d> wrote in message
news:oo********************************@4ax.com...
I'm working on a calendar-program.
I wonder what the best approach would be for storing the begin- and
end date/time for a particular calendaritem.
Right now I have two fields: Startdate and Enddate. Both date/time.
This is giving me terrible headaches when trying to let the user edit
time-part. Let's say startdate is '01/01/2003 22u15'. When I let the
user edit the 22u15 the datepart is set back to 1899 or something.
It's not the first problem I'm countering wit this one. So I begin to
wonder if it's better to store the startdate for instance in two
fields: startdate and starttime. Both of datatype date/time. Has
anyone got experience on this one? What could be the best approach?
thanks,
--
bebelino


Since you were so helpful with my date problem....

Are you entering the entire date & time in the same field? '01/01/2003
22u15' in startdate? Or entering the date at one point and the time at
another? If you enter the full string in a general date formatted field,
both should remain as entered.

As you've found out, access date/time fields hold both date and time. When
you enter a time formatted field, a date of Dec 30, 1899 (or thereabouts) is
stored with the time just as 00:00 is stored with date formatted fields. It
is best to store them seperately if you want to enter them independently.

Ken
Nov 12 '05 #2

P: n/a
On Fri, 3 Oct 2003 23:56:12 +0100, "TS" <tw*******@yahoo.co.ku> wrote:

Thanks for your reply.
Are you entering the entire date & time in the same field? '01/01/2003
22u15' in startdate? Or entering the date at one point and the time at
another? If you enter the full string in a general date formatted field,
both should remain as entered.
Finally I have solved this problem.
As you've found out, access date/time fields hold both date and time. When
you enter a time formatted field, a date of Dec 30, 1899 (or thereabouts) is
stored with the time just as 00:00 is stored with date formatted fields. It
is best to store them seperately if you want to enter them independently.


The date and time are being edited seperatly, but still stored
together in one field.
I still wonder why it's better to store them seperately. Because it
seems to me there's more logic in putting the date and time together
in one field.
I hope off course I won't run into other troubles using this approach.
regards,
--
bebelino

Nov 12 '05 #3

P: n/a
On Fri, 3 Oct 2003 23:56:12 +0100, "TS" <tw*******@yahoo.co.ku> wrote:

Thanks for your reply.
Are you entering the entire date & time in the same field? '01/01/2003
22u15' in startdate? Or entering the date at one point and the time at
another? If you enter the full string in a general date formatted field,
both should remain as entered.
Finally I have solved this problem.
As you've found out, access date/time fields hold both date and time. When
you enter a time formatted field, a date of Dec 30, 1899 (or thereabouts) is
stored with the time just as 00:00 is stored with date formatted fields. It
is best to store them seperately if you want to enter them independently.


The date and time are being edited seperatly, but still stored
together in one field.
I still wonder why it's better to store them seperately. Because it
seems to me there's more logic in putting the date and time together
in one field.
I hope off course I won't run into other troubles using this approach.
regards,
--
bebelino

Nov 12 '05 #4

P: n/a
On Fri, 3 Oct 2003 23:56:12 +0100, "TS" <tw*******@yahoo.co.ku> wrote:

Thanks for your reply.
Are you entering the entire date & time in the same field? '01/01/2003
22u15' in startdate? Or entering the date at one point and the time at
another? If you enter the full string in a general date formatted field,
both should remain as entered.
Finally I have solved this problem.
As you've found out, access date/time fields hold both date and time. When
you enter a time formatted field, a date of Dec 30, 1899 (or thereabouts) is
stored with the time just as 00:00 is stored with date formatted fields. It
is best to store them seperately if you want to enter them independently.


The date and time are being edited seperatly, but still stored
together in one field.
I still wonder why it's better to store them seperately. Because it
seems to me there's more logic in putting the date and time together
in one field.
I hope off course I won't run into other troubles using this approach.
regards,
--
bebelino

Nov 12 '05 #5

P: n/a
bebelino <a.*@c.d> wrote in message news:<jv********************************@4ax.com>. ..
On Fri, 3 Oct 2003 23:56:12 +0100, "TS" <tw*******@yahoo.co.ku> wrote:

Thanks for your reply.
Are you entering the entire date & time in the same field? '01/01/2003
22u15' in startdate? Or entering the date at one point and the time at
another? If you enter the full string in a general date formatted field,
both should remain as entered.


Finally I have solved this problem.
As you've found out, access date/time fields hold both date and time. When
you enter a time formatted field, a date of Dec 30, 1899 (or thereabouts) is
stored with the time just as 00:00 is stored with date formatted fields. It
is best to store them seperately if you want to enter them independently.


The date and time are being edited seperatly, but still stored
together in one field.
I still wonder why it's better to store them seperately. Because it
seems to me there's more logic in putting the date and time together
in one field.
I hope off course I won't run into other troubles using this approach.
regards,


I would just store the date and time together. Access, I think,
stores the value as a double or something, where the integer part is
the date and the fractional part is the time...
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.