Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dren
Jan 5, 2001

Pillbug

LeftistMuslimObama posted:

I've given up on XSLT for my XML problem. It just plain can't handle the weird structure this data is stored in. As an alternative, I've been looking at SAX: http://docs.oracle.com/javase/tutorial/jaxp/sax/parsing.html

I'm very comfortable in Java (it's what all my CS courses have been in), and this looks pretty easy to do. It looks like each time an element is found in the file by the SAX parser, it just invokes the startElement callback method. I think I could use this to simply check if each element has a Title attribute and, if so, print its title and text contents to an html file. The only worry I have is it mentions that it will treat "<" characters in the text contents as additional elements, but my suspicion is that this won't apply because I'm just printing the content of XML straight to a file rather than trying to parse them as more deeply nested XML elements. Does this sound right?

Basically, when I get to an element that contains a title attribute, can I print its text node straight to file without any special handling and not lose any <P>, <TR>, etc tags within? Or do I need to print char-by-char to ensure this is handled right?

Sinestro posted:

Python and lxml or Ruby and nokogiri would be my suggestions for language/library. I mean, you can solve this kind of problem in any language reasonably well.

Adbot
ADBOT LOVES YOU

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
I looked at those too, but I'm concerned that having to install the Python or Ruby executable might be over my users' heads and our corporate image has Java pre-installed. If lxml is that much better I'll look into how difficult it would be to GPO the appropriate executable to everyone (my corporation has a hippie no-masters attitude and makes everyone a local admin. They're loathe to push software out, it's like pulling teeth to get them to do it). Python is a language I should probably have in my toolkit anyway.

edit: I am scanning the python beginner's tutorial, and this is looking sweet. I can see why they don't start you off with this stuff in CS, but this looks a lot more like the langauges I use day-to-day. OK, not quite, my language has no reserved words, no variable types, and all variables are b-trees.

The MUMPSorceress fucked around with this message at 06:16 on Sep 4, 2014

TheresaJayne
Jul 1, 2011

TheEffect posted:

That's good information to know, interesting.

Thank you.

I used to have great fun connecting to port 25 on my companies Email server and doing stuff like

quote:

EHLO whitehouse.gov
MAIL FROM <b.obama@whitehouse.gov>
RCPT TO <myboss@mycompany>
DATA
spurious message from obama
.
QUIT

raminasi
Jan 25, 2005

a last drink with no ice

LeftistMuslimObama posted:

edit: I am scanning the python beginner's tutorial, and this is looking sweet. I can see why they don't start you off with this stuff in CS,

They do in quite a few places. There are technically difficult languages but Python is not generally considered one of them.

kiwid
Sep 30, 2013

I'm looking for a good weather API. Is wunderground still the goon recommended one or are there other players now like forecast.io or anything else?

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

GrumpyDoctor posted:

They do in quite a few places. There are technically difficult languages but Python is not generally considered one of them.

That's what I meant. Python seems to be easy and convenient, which maybe abstracts too much away for a learner to understand what's actually happening in the computer. I was kinda disappointed that my data structures class was in Java instead of C++ or something for the same reason. I feel like I still don't have a strong grasp of dealing with memory because I've never had to do it. I'm taking a compilers class this year and I'm super nervous about dealing with assembly (MIPS specifically) because I've never touched that stuff before.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Don't worry, Assembly isn't that bad, although I find it odd you haven't had an "Intro to Computer Organization" course yet, which is usually where they introduce concepts like bitwise operations, boolean logic, and assembly programming. If you haven't had any assembly experience yet it's probable that you aren't alone, and the instructor will introduce you to programming in assembly at the beginning of the course. Hell, once I got the hang of it it was actually kind of fun, putting simple programs together tiny piece by tiny piece.

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy

kiwid posted:

I'm looking for a good weather API. Is wunderground still the goon recommended one or are there other players now like forecast.io or anything else?

If you're in the US, the NWS has a number of APIs available.

LeftistMuslimObama posted:

That's what I meant. Python seems to be easy and convenient, which maybe abstracts too much away for a learner to understand what's actually happening in the computer. I was kinda disappointed that my data structures class was in Java instead of C++ or something for the same reason. I feel like I still don't have a strong grasp of dealing with memory because I've never had to do it. I'm taking a compilers class this year and I'm super nervous about dealing with assembly (MIPS specifically) because I've never touched that stuff before.

One thing about programming education is that there's a lot of concepts to explain simultaneously early on... notably rigid syntaxes, memory management, and abstract algorithmic thinking. Being able to remove memory management concerns and use a simple syntax helps students focus on just thinking like a programmer which is critical to success in early lessons. Once they clear that hurdle it's easier to introduce new concepts imo.

kiwid
Sep 30, 2013

chmods please posted:

If you're in the US, the NWS has a number of APIs available.

Nah, Canada.

Dren
Jan 5, 2001

Pillbug

LeftistMuslimObama posted:

That's what I meant. Python seems to be easy and convenient, which maybe abstracts too much away for a learner to understand what's actually happening in the computer. I was kinda disappointed that my data structures class was in Java instead of C++ or something for the same reason. I feel like I still don't have a strong grasp of dealing with memory because I've never had to do it. I'm taking a compilers class this year and I'm super nervous about dealing with assembly (MIPS specifically) because I've never touched that stuff before.

They picked what they picked because reasons. Regardless, python is a really good get things done language thanks to the flexibility provided by duck-typing, first class functions, and the dictionary type; the robustness of the standard library and ecosystem; and the generally excellent documentation.

For your task in particular the python lxml library's sloppy HTML parser seems particularly well-suited and certainly easier than writing a SAX parser. Don't get me wrong, you could solve the problem with a SAX parser. There might even be a sloppy HTML parser for Java you could use instead -- I wouldn't know.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

carry on then posted:

Don't worry, Assembly isn't that bad, although I find it odd you haven't had an "Intro to Computer Organization" course yet, which is usually where they introduce concepts like bitwise operations, boolean logic, and assembly programming. If you haven't had any assembly experience yet it's probable that you aren't alone, and the instructor will introduce you to programming in assembly at the beginning of the course. Hell, once I got the hang of it it was actually kind of fun, putting simple programs together tiny piece by tiny piece.

So, everyone else in the class probably has had it, but I'm in a weird situation. I did half a CS major in college (then made bad teenage choices), but at my current job I've gotten pretty bored with what I do (technical writer) and realized I have a lot more fun programming (where I'm challenged) than I do writing change logs and user manuals all day. My company has a program where you can switch to become a developer, but you are required to complete a specific list of CS courses at the local university first. They pay for them, but only if you get >=B and only for the courses on the list. The compilers class is on the list. The Computer Organization course is not. I spoke with the instructor and he said that given my background he'd feel OK with me in the course provided I do some self-education on Google and bought the TA pizza if I use up too much of his time.

I read all of the Wikipedia articles on Assembly, MIPS, and architecture and feel like I 70% understand it. I'm still searching for a decent MIPS tutorial to help me cement the concepts better. It seems for the most part like it's:
1) Move data into registers
2) Do operation on data
3) Repeat until done with data
4) Move data back to memory

I'm not super clear on how this happens in terms of the actual engineering of the processor, but the actual programming seems to be mostly like coaching an old lady through using a computer; you have to dictate each atomic step one at a time.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
For a Comp Org class that's plenty; for a Comp Arch class you'd probably use Patterson & Henessy as the text and work your way from combinatorial and sequential logic through the design of a simple pipelined MIPS-like RISC processor.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

For Compilers that will be fine. You won't need to know the actual EE concepts of what's going on. It's more about knowing how to take assembly and go up, rather than understanding what's happening underneath that.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Coursera has a computer architecture class this fall. I don't know if the timing works out well for you, but it might be worth keeping an eye on.

Ninja edit: There's also a hardware/software interface class that recently completed. You might still be able to sign up and access the videos and quizzes.

TheresaJayne
Jul 1, 2011

kiwid posted:

I'm looking for a good weather API. Is wunderground still the goon recommended one or are there other players now like forecast.io or anything else?

When i was working with Azure They announced that they had datasets available for use, Some were free some you had to pay for.

http://datamarket.azure.com/browse/data?category=weather

Thats the Weather datasets.

Kenishi
Nov 18, 2010
I'm trying to learn Scala and while I understand most of the basics, since I'm good at Java and have Python experience, there are tons of small things I can't figure out. The problem is that most of what I can't understand tends to be symbol/operator usage and its impossible to google since google tends to truncate non-alphanumeric stuff.

Is there a good book that goes more in depth and cover these things? I've been considering getting the O'Reilly book, Programming Scala (new edition), but not sure if it would answer my questions.

Fake Edit: In a declaration like this
code:
trait Future[+T] extends ...
what does the + do? (These are the sort of questions I keep running into)

Doctor w-rw-rw-
Jun 24, 2008

Kenishi posted:

I'm trying to learn Scala and while I understand most of the basics, since I'm good at Java and have Python experience, there are tons of small things I can't figure out.

Scala is a hopelessly broken language with enough good ideas to be brought down by the collective weight of their combined over-complexity (speaking as someone who spent some time learning it). There's a talk by one of its former longtime contributors and founding member of Typesafe that I'd link if I had my computer near.

What are your goals in trying to learn Scala? For practical and modern typesafe languages, there are better choices.

b0lt
Apr 29, 2005

Kenishi posted:

I'm trying to learn Scala and while I understand most of the basics, since I'm good at Java and have Python experience, there are tons of small things I can't figure out. The problem is that most of what I can't understand tends to be symbol/operator usage and its impossible to google since google tends to truncate non-alphanumeric stuff.

Is there a good book that goes more in depth and cover these things? I've been considering getting the O'Reilly book, Programming Scala (new edition), but not sure if it would answer my questions.

Fake Edit: In a declaration like this
code:
trait Future[+T] extends ...
what does the + do? (These are the sort of questions I keep running into)

Get the Odersky book, it covers everything you need to know. (edit: section 19.3, page 417 in my copy of the book)

The + is a variance declaration, it specifies subtyping relationships based on that type parameter.

code:
trait Invariant[T]
trait Covariant[+T]
trait Contravariant[-T]

class Parent
class Child extends Parent

val a1: Invariant[Parent] = new Invariant[Child] // doesn't compile
val a2: Invariant[Child] = new Invariant[Parent] // also doesn't compile

val b1: Covariant[Parent] = new Covariant[Child] // works
val b2: Covariant[Child] = new Covariant[Parent] // doesn't

val c1: Contravariant[Parent] = new Contravariant[Child] // doesn't work
val c2: Contravariant[Child] = new Contravariant[Parent] // works
Covariant stuff is pretty natural, an immutable list of child can also be viewed as a list of parent. (It has to be immutable, because otherwise you'd be able to for example add anything to a list via List[AnyRef].
Contravariant examples are less immediately obvious, but one good one is function arguments. A function that takes a Parent is also a function that takes a Child.
You can have multiple of these in a type, so for example, Function2[-T1,-T2,+R] (aka (T1,T2) => R) is covariant on its return type, but contravariant on its two argument types.

Doctor w-rw-rw- posted:

Scala is a hopelessly broken language with enough good ideas to be brought down by the collective weight of their combined over-complexity (speaking as someone who spent some time learning it). There's a talk by one of its former longtime contributors and founding member of Typesafe that I'd link if I had my computer near.

What are your goals in trying to learn Scala? For practical and modern typesafe languages, there are better choices.

If scala is hopelessly broken, then we might as well give up programming, because everything else is worse. The person you're talking about is paulp, and he still uses scala because it's the least bad option. (see https://github.com/paulp/psp-std/)

Kenishi
Nov 18, 2010

Doctor w-rw-rw- posted:

What are your goals in trying to learn Scala? For practical and modern typesafe languages, there are better choices.
I want to learn a language that feels like it has stronger roots in functional style programming, while not cutting me off from the ability to use a wide array of libraries. Python almost satisfies this but the fact that it uses dynamic typing frustrates me to no end. Finally, a lot of shops that use Java also tend to use Scala for concurrency tasks.


b0lt posted:

Get the Odersky book, it covers everything you need to know. (edit: section 19.3, page 417 in my copy of the book)

The + is a variance declaration, it specifies subtyping relationships based on that type parameter.

code:
..
Covariant stuff is pretty natural, an immutable list of child can also be viewed as a list of parent. (It has to be immutable, because otherwise you'd be able to for example add anything to a list via List[AnyRef].
Contravariant examples are less immediately obvious, but one good one is function arguments. A function that takes a Parent is also a function that takes a Child.
You can have multiple of these in a type, so for example, Function2[-T1,-T2,+R] (aka (T1,T2) => R) is covariant on its return type, but contravariant on its two argument types.

Thanks. I saw that book when looking around, I'll look into getting it. Also, thanks for explaining that usage, that is pretty useful.

raminasi
Jan 25, 2005

a last drink with no ice

Kenishi posted:

I want to learn a language that feels like it has stronger roots in functional style programming, while not cutting me off from the ability to use a wide array of libraries. Python almost satisfies this but the fact that it uses dynamic typing frustrates me to no end. Finally, a lot of shops that use Java also tend to use Scala for concurrency tasks.

I think your options are Scala, Clojure, and F#. F# is delightful if you're willing to live entirely in .NET-land.

fankey
Aug 31, 2001

I need to allow users to define strings that get sent out a RS232 port to control things like DVD players, TVs, projectors, etc. Some have nice ASCII control protocols but others use binary protocols. For the binary protocols I need a way for users to define strings that can contain non-printable characters. Right now I'm parsing standard C escapes but to define a series of bytes it's not the easiest thing to parse or generate for non-programmers. Anyone aware of some other markup or escape that might be more non-nerd friendly?

JawnV6
Jul 4, 2004

So hot ...

fankey posted:

I need to allow users to define strings that get sent out a RS232 port to control things like DVD players, TVs, projectors, etc. Some have nice ASCII control protocols but others use binary protocols. For the binary protocols I need a way for users to define strings that can contain non-printable characters. Right now I'm parsing standard C escapes but to define a series of bytes it's not the easiest thing to parse or generate for non-programmers. Anyone aware of some other markup or escape that might be more non-nerd friendly?

Base64? I'm a little confused at this user who's comfortable defining a series of bytes but still needs a string interface. Maybe have a separate mode for non-ascii where it's input as hex bytes like "01 02 03 0a bb cd"?

e: wait, RS232 or HDMI-CEC?

Doctor w-rw-rw-
Jun 24, 2008

b0lt posted:

If scala is hopelessly broken, then we might as well give up programming, because everything else is worse. The person you're talking about is paulp, and he still uses scala because it's the least bad option. (see https://github.com/paulp/psp-std/)

Oh, neat. That and https://github.com/paulp/policy actually give me hope again for the language. I love case classes and immutability-by-default.

fankey
Aug 31, 2001

JawnV6 posted:

Base64? I'm a little confused at this user who's comfortable defining a series of bytes but still needs a string interface. Maybe have a separate mode for non-ascii where it's input as hex bytes like "01 02 03 0a bb cd"?

e: wait, RS232 or HDMI-CEC?

Either 232, TCP or a UDP packet. The user is an audio contractor. They can pull up the manuals for the products they install. Some ( like Sharp Aquos ) use nice user friendly strings like 'POWER' to turn the TV on. Other devices will say something like 'send the following bytes 0x00 0x21 0x31 0x11'. Our software has a single text box which allows the user to enter a 'command'. It's probably likely it's either ASCII or hex so maybe the mode makes the most sense. I was just curious if some other system ( like Crestron, AMX, other control systems ) have solved this in a more elegant manner.

JawnV6
Jul 4, 2004

So hot ...
I'm building a web application and an API is asking for a "oauth callback url." Does that mean an oauth2 server under my control? Is pyoauth2 a good choice?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

JawnV6 posted:

I'm building a web application and an API is asking for a "oauth callback url." Does that mean an oauth2 server under my control? Is pyoauth2 a good choice?

I am probably out of my depth here but I thought the "callback url" was just how the API hits you back after the user authorizes something.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

pokeyman posted:

I am probably out of my depth here but I thought the "callback url" was just how the API hits you back after the user authorizes something.

Yeah, the oauth callback is how you get sent your credentials from the oauth provider. Those are how you'd link the account on your site to the oauth provider's account.

When you set up the oauth on Google/FB/etc, you'll need to provide a whitelist of callback URLs to prevent some other site pretending to be you.

The oauth frameworks should generally provide you with a way to create a server route that can receive and then do something with the oauth credentials, such as create/login to an account. Depends on the framework you're rolling with and the intent.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

JawnV6 posted:

I'm building a web application and an API is asking for a "oauth callback url." Does that mean an oauth2 server under my control? Is pyoauth2 a good choice?

It looks like in your case you're trying to oauth with another API (oauth consumer)? Looking briefly at the API pyoauth2 should allow for that.

Sab669
Sep 24, 2009

This might be a dumb question, but is it ever a good idea to store a date as a string in a database, instead of a datetime field?

Was stuck on this form at work for a little bit, trying to figure out why searching for records wouldn't work when I found out the back-end team was expecting a date as YYYY-MM-DD string instead of what I was passing them :shrug:

No Safe Word
Feb 26, 2005

Sab669 posted:

This might be a dumb question, but is it ever a good idea to store a date as a string in a database, instead of a datetime field?

Short answer: no

Long answer: yes, but pretty much not in any normal use. At least in the BI world you sometimes use strings for dates/date components, but it's far from the typical use case. And in that case you're using a pre-populated date dimension table anyway.

TheresaJayne
Jul 1, 2011

No Safe Word posted:

Short answer: no

Long answer: yes, but pretty much not in any normal use. At least in the BI world you sometimes use strings for dates/date components, but it's far from the typical use case. And in that case you're using a pre-populated date dimension table anyway.

It sounds like the developers didn't know how to either pull out a between date or pull out in order so they used a string to make it easy.

That should be crossposted to the Code that makes you laugh or cry

No Safe Word
Feb 26, 2005

TheresaJayne posted:

It sounds like the developers didn't know how to either pull out a between date or pull out in order so they used a string to make it easy.
No, it's used for simplified reporting, and the string isn't the source of truth about the date. That's why it's not really a normal use. A date dimension table entry looks something like:

code:
DateKey  FullDate                       DayOfWeek DayNumInMonth DayNumOverall DayName   DayAbbrev WeekdayFlag WeekNumInYear WeekBeginDateKey Month MonthName MonthAbbrev Year  ... other columns ...
20140101 <the actual date as datetime>  4         1             1             Wednesday Wed       Y           1             20131229         1     January   Jan         2014
20140101 <the actual date as datetime>  5         2             2             Thursday  Thu       Y           1             20131229         1     January   Jan         2014
But "other columns" there may include something like "Fiscal Quarter" which would look like "Q1FY2014" or something or maybe just "Q12014". That's really the only valid use I know of for a string that identifies dates: reporting, and only when the string itself is the "destination". That is, you're not expected to do anything further with that date.

Vanadium
Jan 8, 2005

SQLite doesn't have a date/time data type. :(

pliable
Sep 26, 2003

this is what u get for "180 x 180 avatars"

this is what u fucking get u bithc
Fun Shoe

pliable posted:

For some reason, Google reached out to me again for another interview even though they rejected me a few months ago.

But this time though, seems I'll be getting a technical phone screen, but I really need to brush up on Unix/Linux/systems programming internals for an SRE position. Anyone have good sources for that? I have my old textbook which I'll be thumbing through, but if there are any good sources that y'all know about, I'd appreciate it being passed along this way. Thanks!

Cross posting this to get more exposure. Any help would be appreciated, thanks!

JamesieAB
Nov 5, 2005
Hope this is the right place to post this.

I've got a bit of gap in my C.V. which is working against me in finding well paid IT work, I used to be a contractor using VB and SQL server (Oracle, Informix and Access too) since v3 and v7 respectively up to .NET and 2008.

I think that getting MCSA's in VB and SQL server might be the way to go in compensating for my recent lack of work but all the courses look pretty expensive. Does anyone have any recomendations on books or web sites that I can use to study for the exams in VB and SQL server?

hooah
Feb 6, 2006
WTF?
I'm working on a depth-liimited search implementation of the 8-tile puzzle. However, when I learned DFS (and in everything I can find on the Internet), the assumption was made that we have an existing structure that we're searching. Here, I am creating the child nodes as I explore a given state. Am I just going about this wrong, or is there a way to do this?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

hooah posted:

I'm working on a depth-liimited search implementation of the 8-tile puzzle. However, when I learned DFS (and in everything I can find on the Internet), the assumption was made that we have an existing structure that we're searching. Here, I am creating the child nodes as I explore a given state. Am I just going about this wrong, or is there a way to do this?

Make something that generates "the next state" given sufficient inputs. Then you can use it to generate all the states in a loop, or you can effectively pause and restart it as you go.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
Vague question incoming...

Programming is not in my job scope but I am enjoying figuring out how to write simple scripts that make my life easier at work. I'm thinking about tackling a bigger project.

I want to create a web application within my work's intranet. It would be relatively simple to start off with. The user would have a choice to either "create a new form" or "edit existing form". If they wanted to "create a new form", then they would have a free text box where they could type what they wanted on the form, or maybe upload a pdf. If they wanted to "edit existing form" from a database of roughly 100 forms, they could select which form they want to edit. Then maybe print it off, and upload it back once they had handwritten the edits.

My question is, looking at the big picture, I'm unsure what languages would be best to use for something like this. I've never created a website or webapp. I don't know if I should start reading up on javascript/jquery or maybe python/django or maybe if this app could just be done in html5.

Could someone point me in the right direction to start reading?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Hughmoris posted:

Vague question incoming...

Programming is not in my job scope but I am enjoying figuring out how to write simple scripts that make my life easier at work. I'm thinking about tackling a bigger project.

I want to create a web application within my work's intranet. It would be relatively simple to start off with. The user would have a choice to either "create a new form" or "edit existing form". If they wanted to "create a new form", then they would have a free text box where they could type what they wanted on the form, or maybe upload a pdf. If they wanted to "edit existing form" from a database of roughly 100 forms, they could select which form they want to edit. Then maybe print it off, and upload it back once they had handwritten the edits.

My question is, looking at the big picture, I'm unsure what languages would be best to use for something like this. I've never created a website or webapp. I don't know if I should start reading up on javascript/jquery or maybe python/django or maybe if this app could just be done in html5.

Could someone point me in the right direction to start reading?

Python/Django.

If you don't know Python, you should start with Think Python and Learn Python the Hard Way. Then the official Django tutorial.

Adbot
ADBOT LOVES YOU

KM Scorchio
Feb 13, 2008

"If you don't find rape hilarious, you're a sensitive crybaby."
Right, random question concerning a little script I've been using in an Access database at work I've been tinkering with to make it a bit more efficient.

Currently our staff enter new data via a form and I have this set up using the below script to automatically complete the "due date" field with a date 5 working days ahead of the current date, saving them from having to manually enter this date each time.

code:
Public Function PlusWorkdays(dteStart As Date, intNumDays As Long) As Date
PlusWorkdays = dteStart
Do While intNumDays > 0
     PlusWorkdays = DateAdd("d", 1, PlusWorkdays)
     If Weekday(PlusWorkdays, vbMonday) <= 5 And _
      IsNull(DLookup("[HoliDate]", "tblHolidays", _
      "[HoliDate] = " & Format(PlusWorkdays, "\#mm\/dd\/yyyy\#;;;\N\u\l\l"))) Then
          intNumDays = intNumDays - 1
     End If
Loop
End Function

This then updates the value in the relevant form object using the default value "PlusWorkdays(Date(),5)" to give a date 5 working days ready populated in the form when they go to add a new record.

However the problem I face is that due to our business process at 15:30 each day our due date needs to change to 6 working days from todays date rather than 5. I was wondering if there is a simple way I can modify the script to add an extra working day when the local time hits a specified point (15:30 in this case). Unfortunately this is a bit outside my abilities, which mostly run to stealing bits of code from websites and cobbling them together to make something semi functional. Thanks in advance for any suggestions.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply