Innov-AI     Services     Supporters     Contact     About    
Date

Like all languages, you have a few data manipulation functions.

date adddate addtdate current_msdate current_nsdate curdatedate current_datedate current_timedate current_timestampdate curtimedate curtimestampdate dateadddate dateaddtdate datediffdate datedifftdate ts_to_longdate dt_to_longdate long_to_dtdate long_to_tsdate day_of_monthdate day_of_weekdate day_of_yeardate daynamedate diffdate difftdate full_systimestampdate hourdate is_valid_datedate is_valid_datedate is_valid_timedate is_valid_timestampdate is_valid_timestampdate formatdate minutedate monthdate monthnamedate nb_daydate secondedate sysdatedate systimedate systimestampdate nowdate systimestamp_mindate timedate year

date add <date> <field> <number>


Description

    add a number to a date.

Parameters

    date:   The date - String - required
    field:   The field to add (DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date add "1980-06-18" "DAY" 1
mentdb
1980-06-19

date addt <timestamp> <field> <number>


Description

    add a number to a time stamp.

Parameters

    timestamp:   The timestamp - String - required
    field:   The field to add (SEC|MIN|HOUR|DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date addt "1980-06-18 00:00:00" "DAY" 1
mentdb
1980-06-19 00:00:00

date current_ms


Description

    returns the current time in milli second.

admin
date current_ms
mentdb
1496164604097

date current_ns


Description

    returns the current time in nano second.

admin
date current_ns
mentdb
823603146305304

date curdate


Description

    returns the current date.

admin
date curdate
mentdb
2015-09-13

date current_date


Description

    returns the current date.

admin
date current_date
mentdb
2015-09-13

date current_time


Description

    returns the current time.

admin
date current_time
mentdb
14:01:22

date current_timestamp


Description

    returns the current timestamp.

admin
date current_timestamp
mentdb
2015-09-13 14:01:42

date curtime


Description

    returns the current time.

admin
date curtime
mentdb
14:01:57

date curtimestamp


Description

    returns the current timestamp.

admin
date curtimestamp
mentdb
2015-09-13 14:02:13

date dateadd <date> <field> <number>


Description

    add a number to a date.

Parameters

    date:   The date - String - required
    field:   The field to add (DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date dateadd "1980-06-18" "DAY" 1
mentdb
1980-06-19

date dateaddt <timestamp> <field> <number>


Description

    add a number to a timestamp.

Parameters

    timestamp:   The timestamp - String - required
    field:   The field to add (SEC|MIN|HOUR|DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date dateaddt "1980-06-18 00:00:00" "DAY" 1
mentdb
1980-06-19 00:00:00

date datediff <date> <field> <number>


Description

    substract a number to a date.

Parameters

    date:   The date - String - required
    field:   The field to add (DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date datediff "1980-06-18" "DAY" 1
mentdb
1980-06-17

date datedifft <timestamp> <field> <number>


Description

    substract a number to a date.

Parameters

    timestamp:   The timestamp - String - required
    field:   The field to add (SEC|MIN|HOUR|DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date datedifft "1980-06-18 00:00:00" "DAY" 1
mentdb
1980-06-17 00:00:00

date ts_to_long <timestamp>


Description

    Converts a timestamp to a long int.

Parameters

    timestamp:   The timestamp - String - required
admin
date ts_to_long "1980-06-18 00:00:00"
mentdb
330120000000

date dt_to_long <date>


Description

    Converts the date parameter to a long int.

Parameters

    date:   The date - String - required
admin
date dt_to_long "1980-06-18"
mentdb
330120000000

date long_to_dt <date>


Description

    Converts the date parameter sent by the user to a long int.

Parameters

    date:   The date - String - required
admin
date long_to_dt "330120000000"
mentdb
1980-06-18

date long_to_ts <date>


Description

    Converts a long int to a timestamp.

Parameters

    date:   The date - String - required
admin
date long_to_ts "330120000000"
mentdb
1980-06-18 00:00:00

date day_of_month <date>


Description

    Returns the day specified in the date sent in parameter.

Parameters

    date:   The date - String - required
admin
date day_of_month "1980-06-18"
mentdb
18

date day_of_week <date>


Description

    Returns the week value from the date that was sent as parameter.

Parameters

    date:   The date - String - required
admin
date day_of_week "1980-06-18"
mentdb
3

date day_of_year <date>


Description

    Returns the year value from the date that was sent as parameter.

Parameters

    date:   The date - String - required
admin
date day_of_year "1980-06-18"
mentdb
170

date dayname <date>


Description

    Returns the name of the day value from the date sent as parameter.

Parameters

    date:   The date - String - required
admin
date dayname "1980-06-18"
mentdb
wednesday

date diff <date> <field> <number>


Description

    substract a number to a date.

Parameters

    date:   The date - String - required
    field:   The field to add (DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date diff "1980-06-18" "DAY" 1
mentdb
1980-06-17

date difft <timestamp> <field> <number>


Description

    substract a number to a time stamp.

Parameters

    timestamp:   The timestamp - String - required
    field:   The field to add (SEC|MIN|HOUR|DAY|MONTH|YEAR) - String - required
    number:   The number to add - Number - required
admin
date difft "1980-06-18 00:00:00" "DAY" 1
mentdb
1980-06-17 00:00:00

date full_systimestamp


Description

    returns the current full timestamp.

admin
date full_systimestamp
mentdb
2015-09-13 14:03:20.395+0400

date hour <time>


Description

    Returns the hour value of the time that was sent as parameter.

Parameters

    time:   The time - String - required
admin
date hour "12:15:56"
mentdb
12

date is_valid_date <dateToValidate>


Description

    check if a date is valid.

Parameters

    dateToValidate:   The date - String - required
admin
date is_valid_date "1980-06-18"
mentdb
1

date is_valid_date <dateToValidate> <format>


Description

    check if a date is valid.

Parameters

    dateToValidate:   The date - String - required
    format:   The date format - String - required
admin
date is_valid_date "1980-06-18" "yyyy-MM-dd"
mentdb
1

date is_valid_time <timeToValidate>


Description

    check if a time is valid.

Parameters

    timeToValidate:   The time (12:00:01) - String - required
admin
date is_valid_time "12:00:01"
mentdb
1

date is_valid_timestamp <timestampToValidate>


Description

    check if a timestamp is valid.

Parameters

    timestampToValidate:   The timestamp - String - required
admin
date is_valid_timestamp "1980-06-18 12:00:01"
mentdb
1

date is_valid_timestamp <timestampToValidate> <format>


Description

    check if a timestamp is valid.

Parameters

    timestampToValidate:   The timestamp - String - required
    format:   The format (ex: yyyy MM dd HH:mm:ss) - String - required
admin
date is_valid_timestamp "1980-06-18 12:00:01" "yyyy-MM-dd HH:mm:ss"
mentdb
1

date format <timestampToFormat> <formatIn> <formatOut>


Description

    format a timestamp to another format.

Parameters

    timestampToFormat:   The timestamp - String - required
    formatIn:   The in format (ex: yyyyMMdd HH:mm) - String - required
    formatOut:   The out format (ex: yyyy MM dd HH:mm:ss) - String - required
admin
date format "19800618 12:00" "yyyyMMdd HH:mm" "yyyy-MM-dd HH:mm:ss"
mentdb
1980-06-18 12:00:01

date minute <time>


Description

    Returns the minute value of the time that was sent as parameter.

Parameters

    time:   The time - String - required
admin
date minute "12:15:56"
mentdb
15

date month <date>


Description

    Returns the month value of a date sent as parameter.

Parameters

    date:   The date - String - required
admin
date month "1980-06-18"
mentdb
6

date monthname <date>


Description

    Returns the name of the month of the date sent as parameter.

Parameters

    date:   The date - String - required
admin
date monthname "1980-06-18"
mentdb
juin

date nb_day <date1> <date2>


Description

    get the number of days between two dates

Parameters

    date1:   The date 1 - String - required
    date2:   The date 2 - String - required
admin
date nb_day "1980-06-18" "1980-06-20"
mentdb
2

date seconde <time>


Description

    Returns the second value from the time sent as parameter.

Parameters

    time:   The time - String - required
admin
date seconde "12:15:56"
mentdb
56

date sysdate


Description

    returns the current date.

admin
date sysdate
mentdb
2015-09-13

date systime


Description

    returns the current time.

admin
date systime
mentdb
14:04:18

date systimestamp


Description

    returns the current timestamp.

admin
date systimestamp
mentdb
2015-09-13 14:04:32

date now


Description

    returns the current timestamp.

admin
date now
mentdb
2015-09-13 14:04:32

date systimestamp_min


Description

    returns the current timestamp in minimum format.

admin
date systimestamp_min
mentdb
20150913140446

date time <timestamp>


Description

    get the time of a timestamp.

Parameters

    timestamp:   The timestamp - String - required
admin
date time "1980-06-18 12:25:56"
mentdb
12:25:56

date year <date>


Description

    Returns the year value from the date sent as parameter.

Parameters

    date:   The date - String - required
admin
date year "1980-06-18"
mentdb
1980




© 2012 - 2023