Siebel VB Language Reference > Methods Reference for Siebel VB > Date and Time Methods >

Get Current Date and Time Method


The Get Current Date and Time method returns the current date and time as a date variable type according to the setting of the computer date and time. For more information, see Variants.

You can use the Set String Format method to specify the format that Siebel CRM uses to display the date and time.

Format

Now()

This method does not include arguments.

Example

The following example finds the month in the range of 1 through 12 and the day in the range of 1 through 31 for this Thursday. For another example, see Set String Format Method:

Sub Button_Click
   Dim x As Integer, today As Variant
   Dim msgtext As String
   Today = DateValue(Now)
   Let x = 0
   Do While Weekday(Today + x) <> 5
      x = x + 1
   Loop
   msgtext = "This Thursday is: " & Month(Today + x) & "/" & _
         Day(Today + x)
End Sub

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.