Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
inam
Contributor III
Contributor III

find date

hello community 

I have column date created   I want only date .

some rows has date with time & some row only date..i need only date .

for example:-

input:-

Date Created
13-12-2021
15-07-2022
15-06-2022 11:52
17-03-2023 17:52

 

output

Date
13
15
15
17
Labels (2)
4 Replies
Kushal_Chawda

@inam  try below

=date(floor([Date Created])) as Date

or

day(floor([Date Created])) as Date

 

inam
Contributor III
Contributor III
Author

if i use =date(floor([Date Created])) as Date 

output is 13-12-2021

and if i use day(floor([Date Created])) as Date

output is only 13  is correct but date with time output is not show

Kushal_Chawda

@inam  seems like your Date with time is not in Date and Time Format.. first try to format it 

in your load script.. change the date and timestamp format as per the input data format.

SET DateFormat='DD-MM-YYYY';
SET TimestampFormat='DD-MM-YYYY hh:mm';

Screen Shot 2023-04-20 at 15.50.30.png

MarcoWedel

If it's really only the day part of those dates and timestamps you're interested in, maybe just

Left([Date Created],2)

would suffice?



 

table1:
LOAD Left([Date Created],2) as Date     
FROM [https://community.qlik.com/t5/QlikView-App-Dev/find-date/td-p/2062522] (html, codepage is 1252, embedded labels, table is @1);

 

 

MarcoWedel_0-1682100052323.png