Search found 359 matches

by AndyGable
Thursday 28th March 2024 12:48am
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

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

No more clues from me. If you want us to writ your damn pos system, send money. :x I am sorry If I upset anyone I was in a lot of pain last night with my head and I was not understanding anything I was planning on having the date range selection anyway so all i did was implemented that as it was a ...
by AndyGable
Wednesday 27th March 2024 4:37am
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

Re: Get the Previous Sunday from a Date

Ive gone another route now I am using 2 date pickers so the user can select what ever dates they want

I will come back to this once my head is not pounding any more
by AndyGable
Wednesday 27th March 2024 2:43am
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

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 ...
by AndyGable
Wednesday 27th March 2024 1:44am
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

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 AndyGable
Wednesday 27th March 2024 1:18am
Forum: General
Topic: using Manufactor snippets (Convert C programs to Gambas)
Replies: 2
Views: 68

Re: using Manufactor snippets (Convert C programs to Gambas)

Uhmmmm.... C CODE: #include <stdio.h> #include "cashdrawer.h" int main(int argc,char *argv[]) { int machine_type; int ret; machine_type = atoi(argv[1]); ret=Open_Cash(machine_type); printf("open cash return = %d\n",ret); if(ret == 0) printf("open success\n"); else prin...
by AndyGable
Tuesday 26th March 2024 8:06pm
Forum: General
Topic: using Manufactor snippets (Convert C programs to Gambas)
Replies: 2
Views: 68

using Manufactor snippets (Convert C programs to Gambas)

Hi Everyone I was wondering if someone could advise me a Supplier of my PoS Terminal has given me a few programs they have made in C to get the status of the cash drawer port as well as Open the drawer I also have libptcash.so and libptcash.a files and the read me is telling me to use that from my u...
by AndyGable
Monday 25th March 2024 10:10pm
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

Re: Get the Previous Sunday from a Date

The last day of the month is the 1st day of the next month minus one day. yea I know but does that take into account leaps years? in VB.net I can do something like Date = Month.firstday and it will retun 01/01 or 01/02 etc and then I could do Month.lastday and it would return for March 31.03 I need...
by AndyGable
Monday 25th March 2024 7:32pm
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

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 Private Function GetPreviousWeekDayDate(inputDate As Date) As Date Return DateAdd(inputDate, -1, gb.Week) End And DateAdd again ...
by AndyGable
Monday 25th March 2024 1:51am
Forum: General
Topic: [Solved - sort of] Get the Previous Sunday from a Date
Replies: 16
Views: 314

[Solved - sort of] Get the Previous Sunday from a Date

Hi All I need some help I am trying to get the Previous sunday from a date (for example 23/03/2024 should return me the sunday date of 17th March) as I need to get the Sunday to Monday dates for a report that run for the previous week (no matter what day the report would be run this week it would al...
by AndyGable
Wednesday 20th March 2024 12:46am
Forum: General
Topic: Advise on how to read the following json file
Replies: 1
Views: 152

Advise on how to read the following json file

Hi all I have the following line coming in from my Server {"messages":{"transactionId":["Invalid value: 5be3f476-f73e-4968-9ea5-721f622eaca2"]}} but I can not seem to work out how I read in the information from the "transactionId" i have this so far (and this ...