Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Min and Max date

Hello All,

Could you please help me correct the below:

The mistake is by the "RESIDENT MSMEDIA" (In bold and underline)

MSMEDIA:

LOAD ID,

    CampaignID,

    QueueID,

    UniversalTime,

    UniversalTimeString,

    AgentID,

    AgentOid,

    AgentLocalTime,

    LocalTime,

    Date(Floor(AgentLocalTime)) as Date_prise_en_charge,

    Date(Floor(LocalTime)) as Date_Reception,

    AgentUniversalTime,

    AgentUniversalTimeString,

    Time(Time#(WorkDuration,'ss'),'hh:mm:ss') as WorkDuration_1,

    Time(Time#(WrapupDuration,'ss'),'hh:mm:ss') as WrapupDuration_1;

SQL SELECT *

FROM "HN_MediaServer".dbo.MSMedias WHERE CampaignID='E4136357942437B4';

MinMaxDate:

LOAD

    Min(AgentLocalTime) as MinDate,

    Max(AgentLocalTime) as MaxDate,

   

Resident MSMEDIA;

LET vMinDate=floor(peek('MinDate'));

LET vMaxDate=floor(peek('MaxDate'));

Drop Table MSMEDIA;

Many Thanks,

Hasvine

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Remove the extra comma after the Field name MaxDate.

MinMaxDate:

LOAD

    Min(AgentLocalTime) as MinDate,

    Max(AgentLocalTime) as MaxDate ,

  Resident MSMEDIA;

View solution in original post

5 Replies
Anonymous
Not applicable
Author

How AgentLocalTime stores the value??

Is it a mix of Date & Time both?

tamilarasu
Champion
Champion

Remove the extra comma after the Field name MaxDate.

MinMaxDate:

LOAD

    Min(AgentLocalTime) as MinDate,

    Max(AgentLocalTime) as MaxDate ,

  Resident MSMEDIA;

Not applicable
Author

Hello Balraj,

Yes actually it is DD/MM/YYYY HH:MM:SS

Thanks,

HAsvine

Anonymous
Not applicable
Author

Not applicable
Author

Thanks

I works 🙂