NetTalk Central

Author Topic: Display ans select a string field as a date with the lookup ?  (Read 3049 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
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 ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Display ans select a string field as a date with the lookup ?
« Reply #1 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.

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: Display ans select a string field as a date with the lookup ?
« Reply #2 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 ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Display ans select a string field as a date with the lookup ?
« Reply #3 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