Navigation:  thinBasic Modules > DT (Date Handling) >

DT_DateToSec

Previous pageReturn to chapter overviewNext page

 

Description

 

The DT_DateToSec() function converts a given date string to the correspondent number of seconds.

 

Syntax

 

n = DT_DateToSec(sDate As String)

 

Returns

 

Number

The number of seconds.

 

Parameters

 

sDate AS STRING

  The date string.

 

Remarks

 

The sDate string should be like "mm-dd-yy" or "mm-dd-yyyy".

If the the year is two digits only the calculation is done using the century (default %DT_DATE_CENTURY).

Restrictions

 

 

See also

 

DT_SecToDate

 

Examples

 

'---Results "06-13-2005"

MsgBox 0, DT_SecToDate(DT_DateToSec("06-13-05"))

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com