Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change Date and Time ?

How to change the date & time format when given at the same time  like    (19-07-2017  03:31:50).

Any one can you please help to change these kind of formats.

11 Replies
vishsaggi
Champion III
Champion III

Did you try this?

LOAD *,

        Date(YourDateField, 'DD-MM-YYYY hh:mm:ss') AS ActualDateNum;

LOAD fieldname1,

fieldname2,

Num(Floor(Date#(YourDateField, 'DD-MM-YYYY hh:mm:ss'))) AS yourDateField

FROM yourdatasource;

Not applicable
Author

In these type of format (19-07-2017  03:31:50) if want the date only not the time  then what to do?

arvind_patil
Partner - Specialist III
Partner - Specialist III

HI Mahendra,

You might be help below:

Num(Floor(Timestamp#([Date Field], 'DD-MM-YYYY hh:mm:ss'))) AS NewDateField

Thanks,

Arvind Patil

arulsettu
Master III
Master III

try this

date(DATE#('19-07-2017 03:31:50','DD-MM-YYYY hh:mm:ss'),'DD/MM/YYYY') as date_field

Anil_Babu_Samineni

If your variable format same as your date format then you don't need any thing here. Just use Date(FieldName) to get Date and same as Time

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vishsaggi
Champion III
Champion III

Just load like

Date(Date#(YourdateField, 'DD-MM-YYYY hh:mm:ss'), 'DD-MM-YYYY') AS OnlyDate

ramasaisaksoft

Hi Mahendra,

Date(Date#('19-07-2017 03:31:50','DD-MM-YYYY HH:MM:SS'),'DD/MM/YYYY') as Joining Date

it will returns 19/07/2017


Day(Date#('19-07-2017 03:31:50','DD-MM-YYYY HH:MM:SS')) as Joining Date


19

shiveshsingh
Master
Master

=DATE(date#('19/07/2017 3:31:50','DD/MM/YYYY h:mm:ss'),'DD/MM/YYYY')

chinnuchinni
Creator III
Creator III

Hi,

You can go through this,You will get idea 

How to Use Simple Date Functions in QlikView and Qlik Sense | EzDataMunch