HPE Service Manager / Service Center Support and News Forum
Showing results for 
Search instead for 
Do you mean 

Query For Dynamic View..

SOLVED
Go to Solution
Valued Contributor

Query For Dynamic View..

Hi All

 

I have a requirement were as to create a new view between 2 dates for fields open.time.

 

Opened before field:  shoud take the value tod() but in the format eg 16/12/13 00:00:00

 

Open by filed : shoud take the value tod() but in the format eg 16/12/13 00:00:00- 7 00:00:00

 

Can someone guide me to write thh normalized query for the same ...

 

Regards

AA

1 ACCEPTED SOLUTIONS
Honored Contributor Honored Contributor

Re: Query For Dynamic View..

Hello,

before implementing that i have to tell you that any such operations in query of view make a big load on system and might afffect the speed.

 

16/12/13 00:00:00 can be achieved by date(tod())

16/12/13 00:00:00- 7 00:00:00 can be achieved by date(tod())-'7 00:00:00'

 

I have not tested it in my environment but we have previously done such queries.

5 REPLIES
Honored Contributor Honored Contributor

Re: Query For Dynamic View..

Hello,

before implementing that i have to tell you that any such operations in query of view make a big load on system and might afffect the speed.

 

16/12/13 00:00:00 can be achieved by date(tod())

16/12/13 00:00:00- 7 00:00:00 can be achieved by date(tod())-'7 00:00:00'

 

I have not tested it in my environment but we have previously done such queries.

Valued Contributor

Re: Query For Dynamic View..

Hi Vadim

 

Thanks for the response ... However if I use tod() it takes the format as current time and current date .. I need the format as current date and time as 00:00:00.

 

Yes , I am aware of the implication, I will be testing the same in my test environment..

Highlighted
Honored Contributor Honored Contributor

Re: Query For Dynamic View..

Hello,

if you will look at the expression which i posted, you will see that I am not using direclty tod() but date(tod()).

 

 

In this case date() operator is taking the date from current time and adds 00:00:00 to it.

Valued Contributor

Re: Query For Dynamic View..

Hi Vadim

 

All works fine .. Thank you so much .. Greatly Appreciated ..

Honored Contributor Honored Contributor

Re: Query For Dynamic View..