[HCN] Bluechip stored SQL dare format
Peter
peallen at tpg.com.au
Thu Sep 10 10:53:00 CEST 2009
as usual Peter...very informative... as an apprentice nerd I have no idea
what this means but I am sure that it will be of use up the road.... regards
Peter Allen
----- Original Message -----
From: "Peter Machell" <peter at mobilecomputing.net.au>
To: "Unmoderated discussion for HCN software, including Medical
Director,Pracsoft and Bluechip" <hcn at ozdocit.org>
Sent: Thursday, September 10, 2009 5:20 PM
Subject: Re: [HCN] Bluechip stored SQL dare format
>
> On 10/09/2009, at 5:18 PM, Peter Machell wrote:
>
>> On 10/09/2009, at 5:04 PM, Shaun Nell wrote:
>>
>>> Hi,
>>> A client as asked me check the possibility of writing some reports
>>> using their Bluechip SQL database. It looks basic enough except
>>> Bluechip stores the date as an int type rather than datetime. Does
>>> anyone know how to convert this int to a proper date/time format?
>>> At a guess I think it is the days since 0 AD.
>>
>>
>> Sure do, assuming it's the same MSSQL datetime as Pracsoft:
>>
>> "DECLARE @Date DATETIME; SET @Date = FLOOR(CONVERT(FLOAT, GETDATE()));
>> SELECT APPT.[When] BETWEEN @Date
>> AND (@DATE + x)"
>> ORDER BY APPT.[When]"
>>
>>
>> I think I've simplified that code enough for you to work out what is
>> going on. Obviously @DATE is always now. The APPT.[When] brackets
>> are because you really shouldn't use an SQL modifier as a table name
>
> [CORRECTION Column name]
>
>> , but someone over there didn't get that memo.
>>
>> regards,
>> Peter.
>>
>> --
>> Peter Machell
>> Systems Administrator
>> mobilecomputing.net.au
>> (07) 3839 4321
>>
>> _______________________________________________
>> HCN mailing list
>> HCN at ozdocit.org
>> http://ozdocit.org/cgi-bin/mailman/listinfo/hcn
>
> --
> Peter Machell
> Systems Administrator
> mobilecomputing.net.au
> (07) 3839 4321
>
> _______________________________________________
> HCN mailing list
> HCN at ozdocit.org
> http://ozdocit.org/cgi-bin/mailman/listinfo/hcn
>
>
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.88/2357 - Release Date: 09/09/09
17:50:00
More information about the HCN
mailing list