Quick Date Format Question (Hopefully)

B

Bob

Using Access 2000 and am trying to format a Date/Time format to just a date..
In other words id like

3/5/2008 2:43:13 PM

to look like

3/5/2008

Is there a conversion function I can use?

Thanks!

Bob
 
W

Wayne-I-M

=format([Datefield],"d/m/yyyy") = string
or
set the format to short date
will give you 03/05/2008 = date/time
 
B

Bob

I tried the short date and even though the value displays the 3/5/2008, the
date/time appear when I click on it. I need to format this to run some
calculations so I don't need the hour/minute times, just the date itself. I
will try the 2nd option, but essentially I need something that doesn't
recognize that Hour/Minute/second string at all

Wayne-I-M said:
=format([Datefield],"d/m/yyyy") = string
or
set the format to short date
will give you 03/05/2008 = date/time


--
Wayne
Manchester, England.



Bob said:
Using Access 2000 and am trying to format a Date/Time format to just a date..
In other words id like

3/5/2008 2:43:13 PM

to look like

3/5/2008

Is there a conversion function I can use?

Thanks!

Bob
 
F

fredg

I tried the short date and even though the value displays the 3/5/2008, the
date/time appear when I click on it. I need to format this to run some
calculations so I don't need the hour/minute times, just the date itself. I
will try the 2nd option, but essentially I need something that doesn't
recognize that Hour/Minute/second string at all

Wayne-I-M said:
=format([Datefield],"d/m/yyyy") = string
or
set the format to short date
will give you 03/05/2008 = date/time

--
Wayne
Manchester, England.

Bob said:
Using Access 2000 and am trying to format a Date/Time format to just a date..
In other words id like

3/5/2008 2:43:13 PM

to look like

3/5/2008

Is there a conversion function I can use?

Thanks!

Bob

What kind of calculations?
Perhaps you just don't know how to calculate dates.

Formatting only effects how the data is displayed, not the underlying
value.
If the time value of the field is creating a problem, you could remove
the time portion from the field if it's not necessary for other uses.
You will need an Update query to do so:
** Back up your data first. **

Update YourTable Set YourTable.DateField = DateValue([DateField])

Then make sure no new times are added to the table date field. This
usually occurs when Now() is used to enter a date instead of Date().
 
W

Wayne-I-M

Sorry I am confused by this. If you want the date to be used in a
calculation it should work whatever the format.

You can do lots of mad things eg
NewDate: DatePart("d",[TableName]![DateField]) & " " &
DatePart("m",[TableName]![DateField]) & " " &
DatePart("yyyy",[TableName]![DateField])
But this will not give a "date" just a string (not much use in a calculation
with lots of re-messing-about)

What is the reason you can't use the date/time in your calculation. Can you
post the calculation. I am sure there is a way to get it working



--
Wayne
Manchester, England.



Bob said:
I tried the short date and even though the value displays the 3/5/2008, the
date/time appear when I click on it. I need to format this to run some
calculations so I don't need the hour/minute times, just the date itself. I
will try the 2nd option, but essentially I need something that doesn't
recognize that Hour/Minute/second string at all

Wayne-I-M said:
=format([Datefield],"d/m/yyyy") = string
or
set the format to short date
will give you 03/05/2008 = date/time


--
Wayne
Manchester, England.



Bob said:
Using Access 2000 and am trying to format a Date/Time format to just a date..
In other words id like

3/5/2008 2:43:13 PM

to look like

3/5/2008

Is there a conversion function I can use?

Thanks!

Bob
 
J

John W. Vinson

I tried the short date and even though the value displays the 3/5/2008, the
date/time appear when I click on it. I need to format this to run some
calculations so I don't need the hour/minute times, just the date itself. I
will try the 2nd option, but essentially I need something that doesn't
recognize that Hour/Minute/second string at all

To remove the time portion (the fraction after the decimal point in the double
float count of days), use

DateValue([fieldname])

Any Format just controls how the value is displayed, not what's stored.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Convert Date and Time 9
convert GMT Date & Time 6
Transposing Data 2
date and time field 4
Alternate Date Format 4
Compare values from one month to next 2
Time Calculation 1
max of date/time 3

Top