Search found 1546 matches

by BruceSteers
Wednesday 27th March 2024 8:45am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1711

Re: [Solved] Get the Previous Sunday from a Date

Sigh

Not sure what you could not get your head around or why after asking 3 different questions that all got answered you did something completely different? i guess that's your prerogative.
by BruceSteers
Wednesday 27th March 2024 3:55am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1711

Re: Get the Previous Sunday from a Date

I'm not sure what you mean by Hover over them?
Gambas will just display the date object as it is.

If they are using Date objects not Strings then just use Format where you need it formatted

sDisplayString = Format(dtStartDate,"dddd dd/mm/yyyy")
by BruceSteers
Wednesday 27th March 2024 2:11am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1711

Re: Get the Previous Sunday from a Date

That cannot be true you make D a string object not a Date object. Then you make the string and return it... D = "01/" & Format(MonthName, "00") & "/" & Year Return D D will begin with 01/ . just like you made it Unless somewhere else along the line you are u...
by BruceSteers
Tuesday 26th March 2024 1:17am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1711

Re: Get the Previous Sunday from a Date

So i spent a whole minute writing this. (thanks to the clues given by the other Bruce :) ) Public Sub Button1_Click() Debug GetLastMonthDay(Now) Debug Format(GetLastMonthDay(Now), "dddd dd mmm") End Public Sub GetLastMonthDay(hDate As Date) As Date Dim d As Date d = DateAdd(hDate, gb.Day, ...
by BruceSteers
Monday 25th March 2024 2:52am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1711

Re: Get the Previous Sunday from a Date

You cannot use a Date object like that by just adding/subtracting integers from it. You must use DateAdd() https://gambaswiki.org/wiki/lang/dateadd DateAdd() minus 1 week EDIT: sorry i had the gb.Week/gb.Day and the values round the wrong way. Private Function GetPreviousWeekDayDate(inputDate As Dat...
by BruceSteers
Monday 25th March 2024 2:48am
Forum: General
Topic: Control + Shift + F
Replies: 2
Views: 294

Re: Control + Shift + F

It's now Ctrl+Shift+T
by BruceSteers
Saturday 23rd March 2024 3:57am
Forum: General
Topic: Gambas Closing - Error Message
Replies: 8
Views: 1311

Re: Gambas Closing - Error Message

sorry to take so long to reply but we were having a serious discussion about this problem. We do have the latest gambas3 from the gambas ppa. We tried the exec=gambas3 but it gave us nothing except the right click menu on the icon chnaged. Our small group has decided that there is something realy w...
by BruceSteers
Friday 22nd March 2024 5:34pm
Forum: Beginners
Topic: Fileview sort the elements by date
Replies: 5
Views: 1424

Re: Fileview sort the elements by date

Many thanks for your help! It works perfectly. No worries. btw if you want to reverse the order just reverse the 2 arrays before moving the items... If bReverse Then ' reverse the order to show oldest first if required aKeys.Reverse aDates.Reverse Endif ' make the IconView match the list order For ...
by BruceSteers
Friday 22nd March 2024 4:35pm
Forum: Beginners
Topic: Fileview sort the elements by date
Replies: 5
Views: 1424

Re: Fileview sort the elements by date

Or a command something like this... Public Sub SortFileViewByDate() Dim p As Panel = FileView1.Children[0] Dim iv As IconView = p.Children[0] Dim aKeys As New String[] Dim aDates As New Date[] ' make an array of the keys and an array of the modified dates... For Each sKey As String In iv.Keys aDates...
by BruceSteers
Friday 22nd March 2024 4:05pm
Forum: Beginners
Topic: Fileview sort the elements by date
Replies: 5
Views: 1424

Re: Fileview sort the elements by date

It can be done with a little trickery.
You can hack the IconView inside the FileView

Remember this conversation...
https://forum.gambas.one/viewtopic.php?t=1532

You could set the IconView "Sorted" property to false and do it yourself.