Re: Date/Time field initialized as tod() when you choose today date (1679 Views)
Reply
Advisor
Wizz-bell
Posts: 25
Registered: ‎07-20-2011
Message 1 of 4 (1,746 Views)

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.

 

Honored Contributor
Piku
Posts: 4,136
Registered: ‎06-17-2010
Message 2 of 4 (1,698 Views)

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
Wizz-bell
Posts: 25
Registered: ‎07-20-2011
Message 3 of 4 (1,683 Views)

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.

 

Honored Contributor
Piku
Posts: 4,136
Registered: ‎06-17-2010
Message 4 of 4 (1,679 Views)

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.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.