How to change column date format

Creating and using forms
Post Reply
abelmiah
Posts: 12
Joined: Wed Jan 23, 2008 2:33 am

How to change column date format

Post by abelmiah »

When I right click a column with design mode on, there is an option called "Column..". This gives me the ability to change the date format, however it only gives 12 format options. Where can I manually change the format? I need it to display the day only (NN).
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: How to change column date format

Post by TheGurkha »

If all you want to do is display the day value why not just use an integer?
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
abelmiah
Posts: 12
Joined: Wed Jan 23, 2008 2:33 am

Re: How to change column date format

Post by abelmiah »

I'll try anything that works. Thanks for the tip.
abelmiah
Posts: 12
Joined: Wed Jan 23, 2008 2:33 am

Re: How to change column date format

Post by abelmiah »

The integer didn't work. It only displays numbers. I need the written day ie. Mon, Tue, Wed etc.

XP
OO v2.41
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: How to change column date format

Post by TheGurkha »

That's the kind of information that would have been helpful to know in advance!

You can of course store the day name as a string. But is your issue that you want the system to work out the day of the week from the date?
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
abelmiah
Posts: 12
Joined: Wed Jan 23, 2008 2:33 am

Re: How to change column date format

Post by abelmiah »

TheGurkha wrote:That's the kind of information that would have been helpful to know in advance!
I know... I apologize for that. :oops:
TheGurkha wrote:You can of course store the day name as a string.
Like a text string? Manually typing it in? I suppose that would work. The reason I want to know how to manually type in the date format (similar to the Table design "Format code") is so I can sort out future problems using the real dates.
TheGurkha wrote: But is your issue that you want the system to work out the day of the week from the date?
That would be nice. I have it set that way in the table view of Base. I simply copy the date of the date column (ie. 07/26/08) and paste it in the day column and the system automatically converts it to a day (ie. Saturday). This way I have a column that I can sort according to days of the week.
User avatar
Villeroy
Volunteer
Posts: 31345
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to change column date format

Post by Villeroy »

Create a query in SQL view ...

Code: Select all

SELECT DAYNAME("Date") AS "Day Name", "Other Field", "And Another One" FROM "Your particular table"
Replace all doublequoted names with the names of your table and fields. DAYNAME("Date") AS "Day Name" calls a function to derive the day name from an assumed field named "Date" and adds label "Day Name". Let your form use that query (see form properties, tab "Data").
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
abelmiah
Posts: 12
Joined: Wed Jan 23, 2008 2:33 am

Re: How to change column date format

Post by abelmiah »

Query in SQL view? I don't understand. Thanks for the suggestion though.
Post Reply