xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Days()

Calculates the number of days from elapsed seconds.

Syntax

Days( <nSeconds> ) --> nDays

Arguments

<nSeconds>
A numeric value indicating the number of seconds to convert to days.

Return

The function returns the converted value as an integer number of days.

Description

This function converts a number of <nSeconds> seconds to their equivalent number of days as integer value. One day has 86400 seconds.

Info

See also:Date(), ElapTime(), Seconds(), Secs(), Time()
Category: Date and time
Source:rtl\samples.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows the conversion of seconds representing time spans
// of Minute, Hour, Day and Year into equivalent number of days.

   PROCEDURE Main

      ? Days( 60 )                     // result: 0
      ? Days( 3600 )                   // result: 0
      ? Days( 86400 )                  // result: 1
      ? Days( 31536000 )               // result: 365

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe