Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
The problem here is I have a colum which is displaying data as
msg_rcpt_log
10-03-2013 10:21 |
17-07-2015 18:40 |
20-07-2015 17:30 |
20-07-2015 21:49 |
20-07-2015 21:57 |
Now I want to get the dates only so that whenever I click on that date I can get the analytics for that.
To remove the time portion, you must use Floor and NOT just formatting functions. Formatting functions can hide the display of time, but the underlying value still contains the time portion.
To get the time only, use Frac().
IMHO string mangling is unnecessary as QV/QS are well equipped with date functions.
Date(Floor(myDate))
Time(Frac(myDate))
If the date/time is not recognised, then use the recognition functions:
Date(Floor(TimeStamp#(myDate, 'YYYY-MM-DD hh:mm')))
Time(Frac(TimeStamp#(myDate, 'YYYY-MM-DD hh:mm')))
Also, see:
LOAD * INLINE [
time
10-03-2013 10:21
17-07-2015 18:40
20-07-2015 17:30
20-07-2015 21:49
20-07-2015 21:57
];
load SubField(time,'-',1) as day
Resident date;
dates are many I have just gave few for example, So do I have to Load all the date??
no special command so that time gets a cut off from there?
Hi,
Try this:
Time(Date#(DateField,'MM-DD-YYYY hh:mm')) as Time
Date(Date#(DateField,'MM-DD-YYYY hh:mm')) as Date
HTH
sushil
try
trim(SubField(yourdateField,' ',1)) as MyDate
date:
LOAD * INLINE [
time
10-03-2013 10:21
17-07-2015 18:40
20-07-2015 17:30
20-07-2015 21:49
20-07-2015 21:57
];
//load SubField(time,'-',1) as day,
load date(timestamp#(time,'DD-MM-YYYY hh:mm'),'DD') as day1
Resident date;
Not getting any of it I hav 500 rows in that column how can I use inline with this many rows any simple way to go
To remove the time portion, you must use Floor and NOT just formatting functions. Formatting functions can hide the display of time, but the underlying value still contains the time portion.
To get the time only, use Frac().
IMHO string mangling is unnecessary as QV/QS are well equipped with date functions.
Date(Floor(myDate))
Time(Frac(myDate))
If the date/time is not recognised, then use the recognition functions:
Date(Floor(TimeStamp#(myDate, 'YYYY-MM-DD hh:mm')))
Time(Frac(TimeStamp#(myDate, 'YYYY-MM-DD hh:mm')))
Also, see:
Post your application so that we can understand better what the issue is and advise you accordingly
Thank you so very much and ya thank you all for giving me solutions XOXO
Regards,
Cyrus .:)