Navigation:  thinBasic Modules > DT (Date Handling) >

DT_DateToSec

Previous pageReturn to chapter overviewNext page

 

Description

 

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

 

Name

Type

Optional

Meaning

sDate

String

No

A valid date string

 

Remarks

 

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

If the the year is two digits, the calculation is performed using the default century %DT_DATE_CENTURY

 

Restrictions

 

See also

 

DT_SecToDate

 

Examples

 

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

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