Purebasic support from GPT-Chat...
Posted: Mon Dec 26, 2022 1:49 pm
I've been playing with GPT-Chat and amazed how good it is at writing code. So I gave it a very quick PB test to see if it knows PB too...
I'm not sure if you've been playing with this tool but I've been talking to it for a couple of hours tonight and I think the world just changed.
(And I don't mean because of this little snippet of course)
My question:
I'm not sure if you've been playing with this tool but I've been talking to it for a couple of hours tonight and I think the world just changed.

My question:
The reply:In the programming language purebasic, how do I subtract one date from another date and give the answer in milliseconds?
To subtract one date from another date and get the result in milliseconds in PureBasic, you can use the DateDiff function. This function takes two date values as arguments and returns the difference between them in the specified time unit. To get the difference in milliseconds, you can use the #Millisecond constant as the third argument.
Here's an example of how to use the DateDiff function to subtract one date from another and get the result in milliseconds:
Code: Select all
Date1 = CreateDate(2022, 1, 1)
Date2 = CreateDate(2021, 12, 31)
Difference = DateDiff(Date1, Date2, #Millisecond)
Debug Difference
In this example, Date1 is set to January 1st, 2022 and Date2 is set to December 31st, 2021. The DateDiff function is then used to calculate the difference between these two dates in milliseconds, and the result is stored in the Difference variable. Finally, the Debug statement is used to print the value of Difference to the output window.
You can also use other constants with the DateDiff function to specify the time unit you want to use for the result. For example, you can use the #Second constant to get the difference in seconds, the #Minute constant to get the difference in minutes, and so on.