ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Time and Date Format (https://www.excelbanter.com/excel-discussion-misc-queries/182536-time-date-format.html)

Té

Time and Date Format
 
Everytime I enter 442008, which is supposed to be 4/4/2008, and I go to
format cells and try to convert it to a date format i get 2/6/1912. Why is
the computer giving me a different date? I would like to be able to enter
442008, and Excel automatically converts it to a date. The same thing
happens with the time when I type 8:25 and convert it to time I get 6:00.
Can you please tell me what I am doing wrong? Thank you!!!

muddan madhu

Time and Date Format
 
go to Tools | Options | Transition | tick the microsoft excel and not
lotus notes

This might work out..........

On Apr 4, 8:27*pm, Té wrote:
Everytime I enter 442008, which is supposed to be 4/4/2008, and I go to
format cells and try to convert it to a date format i get 2/6/1912. *Why is
the computer giving me a different date? *I would like to be able to enter
442008, and Excel automatically converts it to a date. *The same thing
happens with the time when I type 8:25 and convert it to time I get 6:00. *
Can you please tell me what I am doing wrong? *Thank you!!!



Gary''s Student

Time and Date Format
 
In another cell enter:

=DATE(RIGHT(A1,4),LEFT(A1,1),MID(A1,2,1))

NOTE this will only work with one digit months and days.

1112008 can be either January 11 or November 1
--
Gary''s Student - gsnu200777


"Té" wrote:

Everytime I enter 442008, which is supposed to be 4/4/2008, and I go to
format cells and try to convert it to a date format i get 2/6/1912. Why is
the computer giving me a different date? I would like to be able to enter
442008, and Excel automatically converts it to a date. The same thing
happens with the time when I type 8:25 and convert it to time I get 6:00.
Can you please tell me what I am doing wrong? Thank you!!!


Té

Time and Date Format
 
I have an entire worksheet full of numbers I want to convert into dates
without deleting everything and type mm/dd/yyyy. Is there a format I can
create?

muddan madhu

Time and Date Format
 
Select the entire worksheet

Go to Ctrl + 1 | number tab | click category custom | type mm/dd/yyyy
| ok

On Apr 4, 8:46*pm, Té wrote:
I have an entire worksheet full of numbers I want to convert into dates
without deleting everything and type mm/dd/yyyy. *Is there a format I can
create?



Té

Time and Date Format
 
that converts them into date format, but it changes the entire date to
something else.

Gord Dibben

Time and Date Format
 
Excel will not recognize 442008 as a date.

Or 8:25 as a time.

Enter as 4/4/2008 or 0:8:25

If you don't want to type the / or : then you will need VBA event code.

See Chip Pearson's site.

http://www.cpearson.com/excel/DateTimeEntry.htm


Gord Dibben MS Excel MVP

On Fri, 4 Apr 2008 08:27:00 -0700, Té wrote:

Everytime I enter 442008, which is supposed to be 4/4/2008, and I go to
format cells and try to convert it to a date format i get 2/6/1912. Why is
the computer giving me a different date? I would like to be able to enter
442008, and Excel automatically converts it to a date. The same thing
happens with the time when I type 8:25 and convert it to time I get 6:00.
Can you please tell me what I am doing wrong? Thank you!!!



Gary''s Student

Time and Date Format
 
If you already have the data in the worksheet and want to convert the numbers
into dates, in place, then Select the cells and run:

Sub dateconverter()
For Each r In Selection
v = r.Text
If IsNumeric(v) Then
l = Len(v)
If l = 8 Then
r.NumberFormat = "m/d/yyyy;@"
r.Value = DateSerial(Right(v, 4), Left(v, 2), Mid(v, 3, 2))
End If
If l = 6 Then
r.NumberFormat = "m/d/yyyy;@"
r.Value = DateSerial(Right(v, 4), Left(v, 1), Mid(v, 2, 1))
End If
End If
Next
End Sub

--
Gary''s Student - gsnu200777


"Té" wrote:

I have an entire worksheet full of numbers I want to convert into dates
without deleting everything and type mm/dd/yyyy. Is there a format I can
create?


Té

Time and Date Format
 


Thank you so much!!!


All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com