Re: Date/Time field initialized as tod() when you choose today date (1400 Views)
Reply
Advisor
Wizz-bell
Posts: 25
Registered: ‎07-20-2011
Message 1 of 4 (1,467 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.

 

Please use plain text.
Honored Contributor
Piku
Posts: 3,605
Registered: ‎06-17-2010
Message 2 of 4 (1,419 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,
Please use plain text.
Advisor
Wizz-bell
Posts: 25
Registered: ‎07-20-2011
Message 3 of 4 (1,404 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.

 

Please use plain text.
Honored Contributor
Piku
Posts: 3,605
Registered: ‎06-17-2010
Message 4 of 4 (1,400 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,
Please use plain text.
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