What version of PowerBuilder? I can't get "[date]" to work at all in
either PB 9.0.1 or PB 11.0. However, I can get "[shortdate]" to work
in both, as well as "[shortdate] hh:mm:ss".
(I agree that "[shortdate] hh:mm:ss" works in the
Format->Format field.)
Well, I *almost* had the answer. <g> So this time I started messing
with the right property. Like you, I can get "[date]" and "[date]
[time]" to work. But if I put anything in the mask, even literals,
behind the "[date]", the mask defaults to "mm/dd/yyyy hh:mm:ss:fff". I
can't find anything in the help files that say that "[date]" is a
valid keyword for edit masks in the first place. (All of this is true
for both v9 and v11.)
I played around with the format and the mask. The mask overrides the
format for data entry and not the other way around. That means... your
stuck. Here's the options that I can come up with to work around the
issue...
1. Learn to live with "[date] [time]". It still looks friendly.
2. Use a static mask for the date instead of the Windows regional
settings. I personally prefer the ISO format of yyyy-mm-dd.
3. Use two separate fields: one for the date and another for the time.
You can combine the values in script to get the single value into the
database.