Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Format date and time from one contiguous field

I'm importing a plain text field into a spreadsheet which contains the date
and time as one number in yyyymmddhhmmss format. For example, August 18 at
2:30 PM would be 20080818143000. How can I format the field so it shows as
something more readable like 2008/08/18 14:30:30? I've attempted to create a
custom field category type, but have not been successful. Thank you in
advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default Format date and time from one contiguous field

You can splice it apart and insert the / and spaces yourself because the data
is pretty standard. However I do not think excel will read this as an actual
date format so unless all you care about is the look, then that wouldn't
work. But this would work as a formula to show the number like you requested.

=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)&" "&
MID(A1,9,2)&":"&MID(A1,11,2)&":"&RIGHT(A1,2)

"RCCruiser" wrote:

I'm importing a plain text field into a spreadsheet which contains the date
and time as one number in yyyymmddhhmmss format. For example, August 18 at
2:30 PM would be 20080818143000. How can I format the field so it shows as
something more readable like 2008/08/18 14:30:30? I've attempted to create a
custom field category type, but have not been successful. Thank you in
advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Format date and time from one contiguous field

That worked perfectly. Thank you!

"akphidelt" wrote:

You can splice it apart and insert the / and spaces yourself because the data
is pretty standard. However I do not think excel will read this as an actual
date format so unless all you care about is the look, then that wouldn't
work. But this would work as a formula to show the number like you requested.

=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)&" "&
MID(A1,9,2)&":"&MID(A1,11,2)&":"&RIGHT(A1,2)

"RCCruiser" wrote:

I'm importing a plain text field into a spreadsheet which contains the date
and time as one number in yyyymmddhhmmss format. For example, August 18 at
2:30 PM would be 20080818143000. How can I format the field so it shows as
something more readable like 2008/08/18 14:30:30? I've attempted to create a
custom field category type, but have not been successful. Thank you in
advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Format date and time from one contiguous field

You could use the following formula to convert the string to something
readable as a date/time entry:

=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)&"
"&MID(A1,9,2)&":"&MID(A1,11,2)&":"&RIGHT(A1,2)

--
Kevin Backmann


"RCCruiser" wrote:

I'm importing a plain text field into a spreadsheet which contains the date
and time as one number in yyyymmddhhmmss format. For example, August 18 at
2:30 PM would be 20080818143000. How can I format the field so it shows as
something more readable like 2008/08/18 14:30:30? I've attempted to create a
custom field category type, but have not been successful. Thank you in
advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Format date and time from one contiguous field

That would leave it as a text string, as would the simpler
=TEXT(A1,"0000\/00\/00 00\:00\:00")
but
=--TEXT(A1,"0000\/00\/00 00\:00\:00")
will be a date and time which Excel will understand (format the result as
yyyy/mm/dd hh:mm:ss).
--
David Biddulph

"Kevin B" wrote in message
...
You could use the following formula to convert the string to something
readable as a date/time entry:

=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)&"
"&MID(A1,9,2)&":"&MID(A1,11,2)&":"&RIGHT(A1,2)

--
Kevin Backmann


"RCCruiser" wrote:

I'm importing a plain text field into a spreadsheet which contains the
date
and time as one number in yyyymmddhhmmss format. For example, August 18
at
2:30 PM would be 20080818143000. How can I format the field so it shows
as
something more readable like 2008/08/18 14:30:30? I've attempted to
create a
custom field category type, but have not been successful. Thank you in
advance.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing/ignoring time in a date time field Jeff Excel Discussion (Misc queries) 2 July 18th 08 07:35 PM
Date Time Field SJC Excel Discussion (Misc queries) 2 May 18th 06 11:12 PM
How to Join/concatenate a date field with a time field in Excel? Alan Excel Discussion (Misc queries) 4 August 9th 05 10:07 PM
Drop time in date/time field Gail Excel Worksheet Functions 1 March 21st 05 08:21 PM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"