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

Date/Time field initialized as tod() when you choose today date

Advisor

Date/Time field initialized as tod() when you choose today date

Hi everybody,

 

We have a little issue the way SM 9.31 use date in his GUI.

 

When you click drop down on a date field, you can choose a date.

If you choose today, the date format field contains tod() (dateformat HH24:MI:SS).

If you choose any other day, the format is date 00:00:00.

 

We want to fix "today date" for having date 00:00:00 on some search format.

Like when we search for a quote "open after today", this really don't make sense that the date is tod() since none should be open after tod(). But if today date use the same format as any other date with 00:00:00 that make sense.

 

Also this will be mostly used on advSearch, not field are mandatory. So hardcode it somewhere as default is no good.

Date/Time field should be initialized as NULL.

 

The display using date/time is good for us and we wan't kept it that way.

 

I'm pretty sure there is a way on the format with a mask or a conversion but I don't figure out yet.

 

Could you help me?

 

Thank you.

 

3 REPLIES
Honored Contributor Honored Contributor

Re: Date/Time field initialized as tod() when you choose today date

HI,

You can try to put the expression in 'search' display option like below,
open.after.today in $L.filed=date(tod())

also in case of only using single filed name open after today then better to set some default value.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Advisor

Re: Date/Time field initialized as tod() when you choose today date

It's not really what I was hoping for since this will show a full date and the displayoption will use half of it.

We try to reduce inconstancy.

 

 

But thank Piku.

 

Highlighted
Honored Contributor Honored Contributor

Re: Date/Time field initialized as tod() when you choose today date

Then use strclpl,

==========
Format
$junk=strclpl($string, $number)
Parameters
The following parameters are valid for the strclpl function: Parameter Data type Description
$junk= Not applicable. A syntax requirement only, does not affect the outcome of the function.
$string String The string being modified.
$number Number The number of characters to remove.

Example
$string="Hewlett-Packard"
$number=6
$junk=strclpl($string, $number)


hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.