Date Actions
Jaseci has it's own set of built-in Date Functions
Quantize to Year
#take a standard python datetime string and extract the year out of it accordingly
x = '2021-12-12';
z = date.quantize_to_year(x);
std.out(z);
Quantize to Month
#take a standard python datetime string and extract the month out of it accordingly
x = '2021-12-12';
z = date.quantize_to_month(x);
std.out(z);
Quantive to Week
#take a standard python datetime string and extract the month out of it accordingly
x = '2021-12-12';
z = date.quantize_to_week(x)
std.out(z);
Quantize to day
#take a standard python datetime string and extract the day out of it accordingly
x = '2021-12-12';
z = date.quantize_to_day(x);
std.out(z);
Date Difference
#takes two datetime string and returns an integer that is the number of days in between the two given dates.
z = date.date_day_diff('2021-12-12','2022-12-12');
std.out(z);
Date and Time Now
z = date.datetime_now();
std.out(z);
// Outputs the date and current time
Date Now
z = date.date_now();
std.out(z);
// Outputs the current Date
Date Timestamp Now
z = date.timestamp_now();
std.out(z);
// Outputs a timestamp