phpScheduleIt
May 18, 2013, 06:13:04 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Converting dates/times to readable format  (Read 2451 times)
dapmco
Newbie
*

Karma: 1
Posts: 6


« on: June 27, 2007, 02:59:29 PM »

I would like to export my reservations with dates and times in a readable format. How do I convert them from something like


start_date   end_date   starttime   endtime
1158379200   1158379200   1140   1170

To

August 3,2007 August 3,2007    8am  12pm

Obviously the readable isnt correct.

thanks for any help
Logged
dapmco
Newbie
*

Karma: 1
Posts: 6


« Reply #1 on: June 28, 2007, 03:31:43 PM »

I  figured out a solution to get it to excel.

G4 is cell being converted
date conversion
=DATE(1970,1,1) + G4/86400

I4 is cell being converted
time conversion
=TIME((I4/60),((I4/60)-(INT(I4/60)))*60,0)

Im sure there is a way I could have done this with sql but didnt know how..
Logged
BalotaBJ
Newbie
*

Karma: 0
Posts: 9


« Reply #2 on: September 28, 2010, 03:25:09 AM »

Thank you for posting this. I know it was posted quite sometime ago. Hey, it still helped me a lot. Thank you.

In converting the time to readable format, you might also want to try this:

I4 is cell being converted

=I4/1440
e.g. I4 = 915
915/1440 = 0.63542
*Change to format to time, it should show 3:15 PM.

Quote
time conversion
=TIME((I4/60),((I4/60)-(INT(I4/60)))*60,0)
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #3 on: October 18, 2010, 02:05:06 PM »

Very helpful.  Thank you for posting this!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!