Solved Date to DateTime

If desired I can combine this with a calendar on to one popup.
 
@MajP
Wonderful job MajP. Once again you show the way.
Still...
This will do for new records. For the existing ones problem remains. So I've been awfully wrong not only for the question asked, but in initial design as well, and yeah it's "here we go again..."
It's alright, I'm learning things :)
Thank you so much!!!
 
This will do for new records. For the existing ones problem remains
Well as you cannot possible know the time for all the previous records, the situation is moot surely?
They just remain at 0:00:00
 
Well as you cannot possible know the time for all the previous records, the situation is moot surely?
They just remain at 0:00:00
I would use an update query and add 1 second to the field : DateAdd("s",1,fieldname)
 
This will do for new records. For the existing ones problem remains. So I've been awfully wrong not only for the question asked, but in initial design as well, and yeah it's "here we go again..."
As long as you understand it is only a Display problem and not a data or storage problem.
Even if the field has a format applied, 12:00:00 AM or 00:00:00 as part of the date will not display. It is there, just will not display. I prove this in my example where I simply add time to the existing field using my timepicker.
As said by @kitayam if it bothers you so much you have to see it, then have the default add 1 second to the date and get something 1/1/2023 00:00:01. I tried adding a fraction of a second hoping that would force the display, but it did not.

So I do not understand the "existing problem". There is no existing problem. All you existing records are valid they just have a time of 12:00:00 AM. You could do an update query to add one second to all the records.
Now be careful because it may break a lot of things.
if SomeField = SomeDate
Now that you add a time values as part of your datetimes it is highly unlikely that will return any records. Then you have to do something like
if int(someField) = int(someDate)
or
if SomeField => someDate and somefield < someDate + 1
 
You guys are all wonderful,
@Gasman , you showed the way
@KitaYama , man you gave THE idea, that saved me from days of work!
@MajP , once again you've been so helpful!

So, I added one more field to my table, used the update query suggested to display time too, kept the "only date" one to maintain relationships, used the new field for all my calculations, and that was it. All systems go now. I'm happy again :ROFLMAO:.

To all people who got involved, thank you so much, you're teaching me a lot!
Case solved (once again).
 

Users who are viewing this thread

Back
Top Bottom