Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to extract timestamp from a date field of format yy-mm-dd hh:mm to have a result only yy-mm-dd
Hi
so here you want to extract a date from a timestamp ?
try this:
=Date(Floor(your_field))
Hi,
You can use Date function with floor and Num function.
Date(floor(num(TimeStampField)),'YY-MM-DD') as Date
Regards,
Bhasker Kumar
If the field is text, then this will interpret and convert
Date(Floor(Timestamp#(DateField, 'yy-MM-dd hh:mm'), 'yy-MM-dd')
Date(Floor(Timestamp#(YourDate,'YY-MM-DD hh:mm')),'YY-MM-DD')
LOAD
BUNKER_DELIVERY_NOTE_NUMBER,
DENSITY,
DIFFERENTIAL_REASON,
FUEL_MASS_AFTER_SOUNDING,
FUEL_MASS_BEFORE_SOUNDING,
FUEL_TYPE,
IMO_NUMBER,
LOWER_HEATING_VALUE,
SOUNDING_TIME_TIMEZONE,
SOUNDING_TIME_UTC,
SULPHUR_CONTENT,
TEMPERATURE,
VISCOSITY,
WATER_CONTENT
FROM
mo_purch_sounding_correction_view.qvd
(qvd);
SOUNDING_TIME_UTC in a view is of format yy-mm-dd hh:mm .I want to extract out the hh:mm and have result in form of only YY-MM-DD:
The field SOUNDING_TIME_UTC is in the form of vsql_varchar
SOUNDING_TIME_UTC in a view is of format yy-mm-dd hh:mm .I want to extract out the hh:mm and have result in form of only YY-MM-DD:
The field SOUNDING_TIME_UTC is in the form of vsql_varchar
LOAD
BUNKER_DELIVERY_NOTE_NUMBER,
DENSITY,
DIFFERENTIAL_REASON,
FUEL_MASS_AFTER_SOUNDING,
FUEL_MASS_BEFORE_SOUNDING,
FUEL_TYPE,
IMO_NUMBER,
LOWER_HEATING_VALUE,
SOUNDING_TIME_TIMEZONE,
Date(Floor(Timestamp#(SOUNDING_TIME_UTC,'YY-MM-DD hh:mm')),'YY-MM-DD') AS SOUNDING_DATE,
SULPHUR_CONTENT,
TEMPERATURE,
VISCOSITY,
WATER_CONTENT
FROM
mo_purch_sounding_correction_view.qvd
(qvd);
SubField(SOUNDING_TIME_UTC ,' ',1) as Date
Try this
😧
LOAD * INLINE [
Date
10-01-15 10:45
];
load
Date(Date#(date(floor(Timestamp#(Date,'yy-mm-dd hh:mm'))),'dd-mm-yyyy'),'yy-mm-dd') as NDate
Resident D;