Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum. |
Date field to day extensive |
Post Reply ![]() |
Author | |
gkaiseril ![]() Senior Member ![]() Joined: 15 Jul 2011 Location: USA Points: 4088 |
![]() ![]() ![]() ![]() Posted: 11 Jun 2016 at 4:51pm |
Yes. this is covered in the Acrobat JavaScript API Reference in the util.scand andutil.printd methods.
// custom calculation for the day of week field; event.value = ""; var cMyDate = this.getField("MyDate").valueAsString; if(cMyDate != "") { var oDate = util.scand("mm/dd/yyyy", cMyDate); event.value = util.printd("dddd", oDate); } Edited by gkaiseril - 11 Jun 2016 at 4:57pm |
|
![]() |
|
Sponsored Links | |
![]() |
|
drico ![]() New Member ![]() Joined: 09 Jun 2016 Points: 4 |
![]() ![]() ![]() ![]() |
awesome @try67thank you very much greetings
|
|
![]() |
|
try67 ![]() Senior Member ![]() Joined: 15 Jul 2011 Points: 621 |
![]() ![]() ![]() ![]() |
Yes, it's possible. Use this code as the custom calculation script of the DAY field:
var days = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"]; var date = this.getField("DATE").valueAsString; if (date=="") event.value = ""; else event.value = days[util.scand("dd/mm/yyyy", date).getDay()]; |
|
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com |
|
![]() |
|
drico ![]() New Member ![]() Joined: 09 Jun 2016 Points: 4 |
![]() ![]() ![]() ![]() |
HI folks,
i a newbie and i need some help i have a 2 fields 1 - date (input by user) 2 - day of week (example monday) it's possible show the value day automatically? i attach the problem
thanks for any help |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |