473,472 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to display a midnight value

121 New Member
Hi,

I am trying to enter a date/time "general date" format in a table and a form as follows

01/01/2008 12:00:00

but as soon as i enter 02/01/2008 00:00:00 the 00:00:00 disapears and i need to be able to display it in my from.

also if i just type in the time value as 00:00:00 it remains

am i just being really dumb?

please help this is driving me nuts
Mar 15 '08 #1
3 6642
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. The General Date format is doing what it is supposed to do - it displays a date if there is one, or a time if there is no date - but not both. To have both shown at the same time, enter the following custom format in the format property of the table field or control concerned (in place of the words General Date if this is the default)
Expand|Select|Wrap|Line Numbers
  1. dd/mm/yyyy hh:nn (uk format)
  2. mm/dd/yyyy hh:nn (us format)
If you need the AM and PM times distinguished add AM/PM to the end of the custom format.

-Stewart
Mar 15 '08 #2
phill86
121 New Member
Hi. The General Date format is doing what it is supposed to do - display a date if it is a date, or a time if it is a time. To have both at the same time, you need to enter the following custom format in the format property of the table field or control concerned:
Expand|Select|Wrap|Line Numbers
  1. dd/mm/yyyy hh:nn (uk format)
  2. mm/dd/yyyy hh:nn (us format)
If you need the AM and PM times distinguished add AM/PM to the end of the custom format.

-Stewart
Hi Stewart

Sorted thanks
Cheers Phill
Mar 15 '08 #3
NeoPa
32,556 Recognized Expert Moderator MVP
Dates are stored as integer values and times are stored as fractions of an integer.

As midnight is essentially 0 seconds into any day, the time portion of the value = 0. Thus it looks like a date on its own.

Without explicit formatting, a date alone is displayed as a date, a time alone is displayed as a time and a date / time value is shown as both.

Midnight is assumed to be a stand-alone date therefore the time element is not shown by default.
Mar 16 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Dennis D. | last post by:
VB.net does not seem to have adequate structure for handling time within it's own code. Subtract 15 minutes from 00:00 AM, and an out of range condition results. Subtract 15 minutes from 12:00 PM,...
9
by: GGerard | last post by:
Using Access2000 I have an application that is running 24/7 and I would like this application to perform some routine housekeeping task at midnight. What would be an efficient way of...
3
by: Amy Smith | last post by:
Hello there, I am having a small problem which been challenging me for few days and need help or advice. I am trying to calculate the day-shift for employees based on the time they started and...
4
by: Chris Shenton | last post by:
I set this up 3 days ago and have not seen any of the logs I've created this way being rotated. I expected them to rotate every midnight. I'm calling the code that uses this logger many times,...
8
by: Giulio Petrucci | last post by:
Hi there, I need my application to be notified when it's midnight. How can I do it? (Someone suggested me to use a timer rising an event every minute...please, telle me there is some other...
1
by: greg chu | last post by:
Hi, not sure who has done this. I want to set up a time interval that could be pass midnight. so people can enter 8AM to 8AM (pass midnight to 2nd day) 8AM to 2 AM (pass midnight to 2nd day)...
3
by: vunet.us | last post by:
What is the best method to convert milliseconds (after midnight January 1, 1970 GMT) to formatted time example: 972798180000 ==10/18/2000 14:08:11
0
by: joec | last post by:
I have a DataGridView with a DateTime column, which is filled with DateTime values. Everything displays perfectly, except for DateTime values that have a time value of 12:00:00 AM. In that case,...
2
by: =?Utf-8?B?YmlsbCB0aWU=?= | last post by:
How is midnight represented in ISO 8601 format? Thank you.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.