Date formats in grid

Discuss the database features
Post Reply
FDB
Posts: 15
Joined: Mon Oct 16, 2023 3:36 pm

Date formats in grid

Post by FDB »

I have a grid in a dialog, related to a database.
The grid has several columns, of which one is a date.
Data is writte from a basic macro, having the date in 'standard' format.
But I want this dates in dd/mm/yyyy format and I cannot find any examples on the net.

Macro extract :

Code: Select all

dim date as object		' "com.sun.star.util.Date"
dim date1

date1.Year = 1999
date1.Month = 12
date1.Day = 22
date = date1

hDialog = CreateUnoDialog(DialogLibraries.getByName("MyLibrary").getByName("MyDialog"))
hEventTable = hDialog.getControl ("EventTable")

hColumn1 = makeColumn (hEventTable, "Datum", 50)
hColumn2 = makeColumn (hEventTable, "Remark", 120)

' this will show the date as mm/dd/yy, I want dd/mm/yyyy
hEventTable.Model.GridDataModel.addRow ("",array ("date, "blablabla"))

hDialog.execute ()
Any help ?
advTHANKSance
OpenOffice 4.1.14
OSX 10.14.6 (Mojave)
Post Reply