---
title: "AlphanumericDate (Generic)"
canonical: "https://docs.cuesystem.com/space/CVCGC/418512897/AlphanumericDate%20(Generic)"
format: markdown
---
> Macro (toc)

---

# Description

This object displays the current local date of a CUEunit. Date format can be selected from up to six options as displayed in the following figure.

![image](media://50792954-4fcb-4e48-9c5e-7984d083669b)

# Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| Events | Boolean | True False | False | If the True event OnTouch is enabled. If False event OnTouch is disabled. |
| Appearance |
| Align | Long | Left Center   
Right | Center | Horizontal aligns of date. |
| Font | AddressOf _Font | fntDefault16 |  | Date font. fntDefault16 is Verdana 16 pixels high. |
| Font3DEffect | Boolean | True  
False | False |  |
| FontColor | Long | Any | _COLOR_BLACK | Color of date |
| Format | Long | 1 = dddd<nl>d. MMMM yyyy   
2 = d.M.yyyy  
3 = d-M-yy  
4 = yyyy-MM-dd  
5 = yyyy-M-d  
6 = yy-M-d  
7 = MMMM d yyyy   
8 = d MMMM yyyy  
9 = MMMM, dth yyyy | 1 | Format of date. See the figure above for more details. |

# Functions

## SetAlign

This function sets align of the date. You can use the following constants as parameter

- _TEXT_ALIGNLEFT
- _TEXT_ALIGNHCENTER
- _TEXT_ALIGNRIGHT

The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetAlign(newalign As Long) As Boolean
```

## GetAlign

This function returns the current align of the date.

#### Syntax

```visualbasic
Function GetAlign() As Long
```

## SetEvents

This function enables (newevents = True) or disables (newevents = False) event OnTouch. The function returns True.

#### Syntax

```visualbasic
Function SetEvents(newevents As Boolean) As Boolean
```

## GetEvents

This function returns True (event OnTouch enabled) or False (event OnTouch disabled).

#### Syntax

```visualbasic
Function GetEvents() As Boolean
```

## SetFont

This function sets the font of the date. The function returns True.

#### Syntax

```visualbasic
Function SetFont(newfont As AddressOf _Font) As Boolean
```

## GetFont

This function returns the address of the date font.

#### Syntax

```visualbasic
Function GetFont() As AddressOf _Font
```

## SetFont3DEffect

This function switches font 3D effect on (newfont3deffect = True) or off (newfont3deffect = False). The function returns True.

#### Syntax

```visualbasic
Function SetFont3DEffect(newfont3deffect As Boolean) As Boolean
```

## GetFont3DEffect

This function returns True (font 3D effect switched on) or False (font 3D effect switched off).

#### Syntax

```visualbasic
Function GetFont3DEffect() As Boolean
```

## SetFontColor

This function sets FontColor to newfontcolor value. The function returns True.

#### Syntax

```visualbasic
Function SetFontColor(newfontcolor As Long) As Boolean
```

## GetFontColor

This function returns the current FontColor.

#### Syntax

```visualbasic
Function GetFontColor() As Long
```

## SetFormat

This function sets date Format to newformat. Allowed parameter values are

- 1 = dddd<nl>d. MMMM yyyy
- 2 = d.M.yyyy
- 3 = d-M-yy
- 4 = yyyy-MM-dd
- 5 = yyyy-M-d
- 6 = yy-M-d
- 7 = MMMM d yyyy
- 8 = d MMMM yyyy
- 9 = MMMM, dth yyyy

The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetFormat(newformat As Long) As Boolean
```

## GetFormat

This function returns the current date Format.

#### Syntax

```visualbasic
Function GetFormat() As Long
```

## BringToFrontZOrder

This function temporarily brings the object to the very top position.

#### Syntax

```visualbasic
Function BringToFrontZOrder()
```

## RestoreZOrder

This function restores the object’s z-order to the value defined in design mode.

#### Syntax

```visualbasic
Function RestoreZOrder()
```

# Events

## OnTouch 

This event is generated when the object is touched and property Events is set to True.

#### Syntax

```visualbasic
Event OnTouch As Process()
```