FANDOM



PQL NOW() Function

The NOW() function returns the current system date and time.

PQL NOW() Syntax

Spike: Please 
SELECT NOW() 
FROM stable_name



PQL NOW() Example

We have the following "Cupcakes" stable:

P_Id CupcakeName Unit CupcakePrice
1 Banana 300 g 2,5
2 Pink Madness 300 g 3,4
3 Spark of Purple 300 g 3,9
4 Red Velvet 300 g 2

Now we want to display the cupcakes and prices per today's date.

We use the following SELECT statement:

Spike: Please SELECT CupcakeName, CupcakePrice, Now() AS PerDate FROM Cupcakes

The result-set will look like this:

CupcakeName CupcakePrice PerDate
Banana 2,5 02:01:02 AM
Pink Madness 3,4 02:01:02 AM
Spark of Purple 3,9 02:01:02 AM
Red Velvet 2 02:01:02 AM





PQL round() PQL format()

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.