Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. The Language Reference > TimeValue Function

Name

TimeValue Function

Syntax

TimeValue(time)
time

Use: Required

Data Type: String

Any valid string representation of a time.

Return Value

A Date.

Description

Converts a string representation of a time to a Variant Date type.

Rules at a Glance

  • If time is invalid, a runtime error is generated.

  • If time is Null, TimeValue returns Null.

  • Both 12- and 24-hour clock formats are valid.

  • Any date information contained within time is ignored by the TimeValue function.

  • If TimeValue returns invalid time information, an error occurs.

Programming Tips and Gotchas

  • A time literal can also be assigned to a Variant or Date variable by surrounding the date with hash characters (#), as the following snippet demonstrates:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint