Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default parsing on a date string pulled from a database.

Hi,

I need to evaluate data based on date but, unfortunately, the string that I
have to work with is as follows:

4/3/2006 13:22

I'm not concerned with the time stamp. I need to reduce it to 4/3/2006 and
then be able to seperate out the day, month and year. This is so I can show
'X' amount of items in a year, in a month, etc.

I've done this before but it's always been a bit tedious.

I can change the format of the cell to Day-Month-Year but the time stamp
remains which causes problems with calculations.

Is there an easy way to get rid of the time stamp and seperate out the
calendar items?

If there are 150 to 300 of these items entered in any given year and I want
to view just the year, it's a HUGE pain to have to put them into a pivot
table and uncheck the years or months I don't want!

Thanks in advance!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default parsing on a date string pulled from a database.

Zone,

I don't have an exact answer to your question as I do not fully under
stand what you are asking.

I think that a few things might be very helpful to you though.

Firstly, excel stores all of it's dates as numbers.

This means that you can subtract 2 dates and then if you format the
result to be a number you will get the amount of days between the 2
numbers.

Also it is stored with the whole numbers representing the date and the
decemials representing the time. if you use a formula like
=LEFT(B1,5), where b1 is the cell that the date is in and 5 is the
length of the whole number than you can seperate the date from the
number. Also the formula =FIND(".",B1) works and my testing shows that
it works better.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default parsing on a date string pulled from a database.

If it is a real date plus time then using

=INT(B1)

is enough



--
Regards,

Peo Sjoblom



"weezer007" wrote in message
oups.com...
Zone,

I don't have an exact answer to your question as I do not fully under
stand what you are asking.

I think that a few things might be very helpful to you though.

Firstly, excel stores all of it's dates as numbers.

This means that you can subtract 2 dates and then if you format the
result to be a number you will get the amount of days between the 2
numbers.

Also it is stored with the whole numbers representing the date and the
decemials representing the time. if you use a formula like
=LEFT(B1,5), where b1 is the cell that the date is in and 5 is the
length of the whole number than you can seperate the date from the
number. Also the formula =FIND(".",B1) works and my testing shows that
it works better.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default parsing on a date string pulled from a database.

EDIT: the formula =FIND(".",B1) should have been =VALUE(LEFT(B1,
(FIND(".",B1))-1))

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
Parsing a text string into separate cells Bobalew Excel Worksheet Functions 1 June 6th 07 09:16 PM
parsing a date field carriex3 Excel Discussion (Misc queries) 2 August 1st 06 09:30 PM
Line information pulled out base on date FGOMEZ Excel Discussion (Misc queries) 1 April 7th 06 02:20 AM
String parsing with variable lenght strings frosterrj Excel Worksheet Functions 10 March 31st 06 11:46 PM
Parsing when deliminator is a string Rose Excel Worksheet Functions 5 December 14th 04 12:54 AM


All times are GMT +1. The time now is 01:17 PM.

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"