Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Date edit mask

507 views
Skip to first unread message

danielshields

unread,
Jul 6, 2007, 11:17:18 AM7/6/07
to
In the editmask for a datetime field I can put
"[date] [time]" or "mm/dd/yyyy hh:mm:ss" but I want to put
"[date] hh:mm:ss" and it doesn't work. How can I fix this?

Jason 'Bug' Fenter [TeamSybase]

unread,
Jul 6, 2007, 11:54:06 AM7/6/07
to


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".

danielshields

unread,
Jul 6, 2007, 12:11:36 PM7/6/07
to
I think you are referring to the Format->Format field in
properties. I am using the Edit->Mask field. (Otherwise
when the user edits the field the display changes.)

danielshields

unread,
Jul 6, 2007, 1:00:05 PM7/6/07
to

(I agree that "[shortdate] hh:mm:ss" works in the
Format->Format field.)

Jason 'Bug' Fenter [TeamSybase]

unread,
Jul 6, 2007, 4:43:54 PM7/6/07
to


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.

0 new messages