Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need help to 6 month's of data from GCP
GCP column is GCP_Date
GCP_Date format is - DD/MM/YYYY HH:MM:SS AM/PM
LOAD
GCP_Date as Date,
Id as ID,
Name ;
Sql
Select
GCP_Date,
Id,
Name
From gcp_view
Where
GCP_Date > Date_Sub(format(now(), 'DD/MM/YYYY HH:MM:SS TT'), -180 Day);
Can anyone help with where clause condition for this.
The above one didn't work
Hi @sunny_ryuke, Try this
// Step 1: Calculate the date 6 months ago from today
let currentDate = Date(Today());
let sixMonthsAgo = Date(AddMonths(currentDate, -6), 'DD/MM/YYYY');
// Step 2: Load your data with a WHERE clause to filter dates
LOAD
GCP_Date,
Value
FROM your_data_source
WHERE GCP_Date >= $(sixMonthsAgo);