Skip to main content
Question

how to read date time in hours and mintues

  • May 13, 2015
  • 2 replies
  • 66 views

ruby
Contributor
Forum|alt.badge.img+6
Hi, I am very new to FME.  I am creating my first report in FME and having some issues.  I am trying to pull report from excel and i need to get sum of ri x Ni.  In my excel worksheet is sum read as 1633:11 but in fx column it displays 3/8/1900 1:11:52AM.  I am writing the final results in Microsoft Access.  How do I get my results to display 1633:11.

 

 

Thank you

 

R

 

 

 

 
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • May 14, 2015
Hi,

 

 

I'm unclear what "sum of ri x Ni" and "fx column" mean.

 

If you need to calculate the time difference between "3/8/1900 1:11:52AM" and "1/1/1900 0:0:0", the DateFormatter transformer might help you.

 

 

The transformer with the following setting converts the datetime string to the number of seconds from the epoch (in this case, the result will be negative since the epoch is 1970-01-01 00:00:00 UTC)

 

-----

 

Source Date Format: Unknown - Automatic Detection

 

Destination Data Format: %s

 

-----

 

You can calculate the difference in seconds and then convert it to hours and minutes.

 

 

... but the time difference between them is 1585:11.

 

31 days (1 Jan. 00:00:00 - 1 Feb. 00:00:00)

 

+ 28 days (1 Feb. 00:00:00 - 1 Mar. 00:0:00)

 

+ 7 days (1 Mar. 00:00:00 - 8 Mar. 00:00:00) = 66 days

 

66 days x 24 hours + 1:11:58 = 1585 hours 11 minutes 58 seconds

 

 

Note that the year 1900 is not a leap year.

 

Leap year - Wikipedia (http://en.wikipedia.org/wiki/Leap_year)

 

What is a Leap Year? (http://www.timeanddate.com/date/leapyear.html)

 

 

Takashi

pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • May 14, 2015
As far As I understand the question, you are reading the data from Excel file which has time  in Hours:Min format and you want the output (sum of the column) in Hours:Minutes format in Microsoft Access. Right?