CMonth() Method



|Visual FoxPro Toolkit for .NET | |

CMonth() Method

Receives a DateTime as a parameter and returns the current month formatted as a string

[pic]

This method maps directly to existing functionality in the .NET. Use the code listed in the Implementation section of the help detail instead.

[Visual Basic]

Public Shared Function CMonth(ByVal dDate As System.DateTime) As String

[C#]

public static string CMonth(System.DateTime dDate)

Example

[Visual Basic]

Dim tDateTime As DateTime = DateTime.Now

Dim lcDate As string = CMonth(tDateTime) 'returns "May"

[C#]

DateTime tDateTime = DateTime.Now;

string lcDate = VFPToolkit.dates.CMonth(tDateTime); //returns "May"

Implementation

[Visual Basic]

Public Shared Function CMonth(ByVal dDate As System.DateTime) As String

Return dDate.ToString("MMMM")

End Function

[C#]

public static string CMonth(System.DateTime dDate)

{

return dDate.ToString("MMMM");

}

Requirements

Namespace: VFPToolkit

Class: VFPToolkit.dates

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: VFPToolkit (in VFPToolkitNET.dll)

See Also

VFPToolkit.dates Members | VFPToolkit Namespace

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download