NetTalk Central

Author Topic: Date picture format  (Read 4994 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Date picture format
« on: June 13, 2009, 03:51:27 AM »
Hi,
In the NTWS extension, general tab, we can see a Date picture format field.
Is is in dd/mm/yyyy by defalut but if I , by ex, add a date column to a browse it comes with @d17
So, What is it for?

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Date picture format
« Reply #1 on: June 14, 2009, 10:40:35 PM »
date entry - ie forms.

The browse uses the date pic from your dictionary.

On a browse use
p_web.site.datepicture
as the picture, then it'll match the forms.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Date picture format
« Reply #2 on: June 16, 2009, 02:51:44 AM »
Thanks, but then, how is the best way to change the date picture at runtime for all the system, browses, forms, etc?
I thought it was suficient to set it to @d17
Dont forget I need to change it at runtime depending on the user language, then one session may be using @d2 and another session using @d6

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Date picture format
« Reply #3 on: June 16, 2009, 04:30:14 AM »
Use p_web.site.datepicture
Then you can set this to anything you like based on the session in WebHandler.
(ProcessLink, before parent call)

Cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Date picture format
« Reply #4 on: June 17, 2009, 02:17:12 PM »
Hey Bruce,
Can you give me an example on that?
Rene
Rene Simons
NT14.14

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Date picture format
« Reply #5 on: June 18, 2009, 02:02:59 AM »
Hi Rene,

I think the only change we need to add is.

p_web.site.datepicture = '@d17'

for every user to use its own machine declared pcture format.

Am I wrong Bruce?

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Date picture format
« Reply #6 on: June 18, 2009, 10:38:57 PM »
Hi Alberto,

D17 would give you the date setting for the server, not the client machines. There's no way to get the date setting from a client machine.

Hence you need to explicitly set what you want, either at the server, or session level.

cheers
Bruce

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Date picture format
« Reply #7 on: June 18, 2009, 10:40:46 PM »
Hi Rene,

Assuming the user logs on.
And in your login you have something like
p_seb.SSV('PreferredDatePic','@d6')

Then in WebHandler, ProcessLink, before parent call
self.site.datepicture = self.GSV('PreferredDatePic')

Cheers
Bruce