True comparison of dates should be done when the date is converted to yyyymmdd format, otherwise you will likely not get the results you desire.
Format(Date,"yyyymmdd") Thank you, Mitch Lawrence Lead Applications Analyst Technical Support - NPR/Automation CHRISTUS Information Management *: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Send a "thank you <http://intranet.christushealth.org/spiritBuck/Default.asp> " to someone! ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2008 8:26 AM To: [email protected] Subject: [talkbws] Comparing Dates Morning all, I'm have a bit of an dilemma this morning. I'm comparing Dates (equal or less than) and thought I had it working last night. I have a pre-defined date in my datastation and want to check it against the viewed date from Meditech. This is my latest coding modification F("OrgDate") =Left$(D("6"),8) '03/22/08 F("Date") =Trim$(View(Row:=Row, Col:=22, Length:=8) ) '10/24/06 If F("Date")= F("OrgDate") then Step = "Correct Date" End if ' no problems here, works just fine If F("Date")< F("OrgDate") then Step = "Check Anyhow" End ' I thought this was working, but it turns out it is only checking DD for the condition. If I change the code to this; F("OrgDate") =Format(Left$(D("6"),8),"MMDDYY") '032208 F("Date") =Format(Trim$(View(Row:=Row, Col:=22, Length:=8) ),"MMDDYY") '102406 If F("Date")= F("OrgDate") then Step = "Correct Date" End if If F("Date")< F("OrgDate") then Step = "Check Anyhow" End I don't think the MMDDYY actually converts the data to a date, if it did, the less than statement would be true, but it remains false. Any thoughts for a solution? p.s. each of these are in different steps, I don't have them all crammed into one rule. :) p.p.s Thom, any chance one of the next BWS releases will have an "auto-save" function? Thanks. Brian Bennett Affinity Health Systems Systems Analyst PBS\Clinic Billing (920)628-9055 [EMAIL PROTECTED] --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [EMAIL PROTECTED] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx
<<image002.jpg>>
