NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: MikeR on March 06, 2013, 01:55:38 AM

Title: Display ans select a string field as a date with the lookup ?
Post by: MikeR on March 06, 2013, 01:55:38 AM
I have an external SQL database that I am displaying updating on a netwebform.
The field date1 is defined in the sql table as a string field (varchar) .
It actually contains a date in the format yyyy-mm-dd
I am happy to display it as such but would like the functionality to edit is and have a calendar lookup for it on the form.
also I have to store it back in the database as a string yyyy-mm-dd ?
How can I accomplish this ?
Title: Re: Display ans select a string field as a date with the lookup ?
Post by: Bruce on March 06, 2013, 02:43:19 AM
well I guess one useful tip is that
yyyy-mm-dd
is
@D10-

That may come in handy somewhere - but I'd have to experiment a bit to see what is involved in storing the date (formatted) in a string field.
Title: Re: Display ans select a string field as a date with the lookup ?
Post by: MikeR on March 06, 2013, 04:50:34 AM
Thanks Bruce, look forward to your response, changing the field to date in netwebform obviously doesn't work ?
Title: Re: Display ans select a string field as a date with the lookup ?
Post by: Bruce on March 07, 2013, 12:15:47 AM
Hi Mike,

I've added an option to NT 7.07 called

Date Lookup Picture

so now when you add a date field to a form, you can specify the picture and the Date Lookup picture separately.

In your case you'd set the Picture to '@s10' and the DateLookup Picture to '@D10-'

For existing apps nothing changes. If the Date Lookup Picture is blank then the Picture is used instead. If the Picture field is blank then the p_web.site.DatePicture picture is used.

cheers
Bruce