Solved

Formatting

Posted on 2011-02-23
8
195 Views
Last Modified: 2012-05-11
Can anyone formatt Col G+H? I have tried but am failing

Just want them in date and time format

Thanks
Seamus
Example.xls
0
Comment
Question by:Seamus2626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 4

Expert Comment

by:h3nnys
ID: 34960273
could you upload the sourse file so that I can format it and see where the issue lies
0
 

Author Comment

by:Seamus2626
ID: 34960287
here is the code that is creating the data in G+H

Thanks
Seamus
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 167 total points
ID: 34960291
Hello Seamus,

To get the date in G2 use

=INT(C2)

and for the time in H2

=MOD(C2,1)

format in date and time format respectively

regards, barry
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 19

Assisted Solution

by:MINDSUPERB
MINDSUPERB earned 166 total points
ID: 34960297
Use this formula in G2 and H2
=VALUE(LEFT(C2,9))

Format Column G into Date and Column H into Time.

Sincerely,

Ed
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 34960310
It must be only =VALUE(C2)

instead of =VALUE(LEFT(C2,9))


Ed
0
 
LVL 9

Assisted Solution

by:sah18
sah18 earned 167 total points
ID: 34960315
There are several ways to accomplish this.  I've attached one possible solution.
Example-with-corrected-date-time.xls
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34960358
Using LEFT(C2,9) is a mistake, I think. That would be fine if C2 was a text value.....but it's not so by extracting the first 9 characters you are actuallt taking the date serial number (5 digits) plus decimal point and then 3 decimal places. If you use VALUE function on that you can format as a date but the underlying value still contains the decimals (effectively a time) which might cause problems if you want to do other calculations with the value returned.

INT, as per my suggestion, just takes the integer portion of C2 (the date) and MOD(C2,1) takes the decimal part (the time)

regards, barry
0
 

Author Closing Comment

by:Seamus2626
ID: 34960414
Thanks guys!
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question