Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Karahs
Partner - Creator
Partner - Creator

QS-last date of the month

hello everyone,

          how to get last date of the month?

Thanks

20 Replies
Karahs
Partner - Creator
Partner - Creator
Author

hey am getting timestamp values

Kushal_Chawda

Can you show the screenshot how your data looks like and what is the result you are getting?

sunny_talwar

You are getting timestamp even after adding Floor and date functions? Would you be able to share the script you are using and the list box for where you are seeing timestamp values for the fields where you have used Date(Floor())

Karahs
Partner - Creator
Partner - Creator
Author

Untitled.png

Karahs
Partner - Creator
Partner - Creator
Author

LIB CONNECT TO 'TempBI ()';

Table1:

LOAD CallLogID,

    month (ModifiedDate) as new_month ,

    AtmID;

SQL SELECT CallLogID,

    ModifiedDate,

    AtmID

FROM ."CallLog_ATM";

LIB CONNECT TO 'TempBI ()';

Table2:

LOAD AtmID,

    CreatedDate,

    ModifiedDate,

    LocationCode,

    TakeOverDate,

    HandOverDate,

 

    Date(Floor(MonthEnd(Date(HandOverDate))), 'DD/MM/YYYY') as lastdate_Handover,

    Date(Floor(MonthEnd(Date(TakeOverDate))), 'DD/MM/YYYY') as lastdate_Takeover;

SQL SELECT AtmID,

    CreatedDate,

    ModifiedDate,

    LocationCode,

    TakeOverDate,

    HandOverDate

FROM ATM.Atm;

sunny_talwar

I am not seeing any time component of the timestamp in both the date fields. What makes you think that these are timestamps?

lalitinmbd
Partner - Contributor III
Partner - Contributor III

Use This..

=MonthEnd(Date)

Karahs
Partner - Creator
Partner - Creator
Author

y am i getting so many jan month even if the date is of feb month?

sunny_talwar

because you have three columns in your table. Seems like New_Month is linked to Takeover. Remove Handover from this table and you will see only one Jan, Feb... etc

Karahs
Partner - Creator
Partner - Creator
Author

Yes wen i remove handover and takeover i get jan,feb,etc...

but i want to put in this table only and whats is the reason that am getting like dis output?