Solved

how do I convert a date time field to a date field and the time section into seconds instead of hours, minutes and seconds

Posted on 2014-10-18
8
111 Views
Last Modified: 2014-11-23
I have a date time field that I need to split into a date and a time field, and I also have to change the time from hours, minutes and seconds into total seconds, based on hours minutes and seconds.  THe system that I am importing data into does not use hours minutes and seconds, just seconds.

I will be formatting the data in excel and then importing.
0
Comment
Question by:sannunzi
  • 4
  • 2
8 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40389340
Date

=int(a1)

Time

=(a1-int(a1))*24*60*60

Make sure you format the date answer as a date, otherwise it will look like a 5 digit number
0
 

Author Comment

by:sannunzi
ID: 40389442
That worked great.  Thanks!
0
 

Author Comment

by:sannunzi
ID: 40389443
That worked great.  Thanks!
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:sannunzi
ID: 40389444
That worked great.  Thanks!
0
 

Author Comment

by:sannunzi
ID: 40389445
That worked great.  Thanks!
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40391475
You're welcome. You're welcome. You're welcome. You're welcome. :-)

To close the question, please click "Accept solution" on my previous comment.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40460434
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

832 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