Yes, I am using .net provider. I didn't capture the trace. It was a
while back, and have been living with a 24 hour time query that works.
(the objective is to get the 12 hour time, with an a or p attached for am/pm)
The successful query produces this on the live site: "Mon 19 May -
17:30" (https:://nevadacity.rocks) (note the dot rocks)
The query that works on Dev, but not on Live produces "Mon 19 May -
5:30" (hopefully I can add a or p)
At this point, I would have to recompile the failing query and deploy
the full web app, go public with it to get the message, Then I would
have to recompile with the working one, and redeploy, so it will
continue to work for my users. (but I will do it if we cannot spot the
problem)
I have attached the code snippetsin a file. I will also paste below
(someone tell me if I should not paste so much code) Thank you - Kyle
Green
////////// select portion used for both working and failing query
/////////////////
sbQuery.AppendLine(" SELECT T1.VenId, T1.VenName ");
sbQuery.AppendLine(" ,T2.CalEvId ");
sbQuery.AppendLine(" ,T2.EventStart ");
sbQuery.AppendLine(" ,T2.EventName ");
sbQuery.AppendLine(" ,T2.EventDescSummary ");
sbQuery.AppendLine(" ,T2.ImgUrl ");
sbQuery.AppendLine(" ,T4.ArtId ");
sbQuery.AppendLine(" ,T4.ArtName ");
sbQuery.AppendLine(" ,(T4.UrlPathName || T4.UrlDataName) as
FullArtistPath "); //must add comma for query manager BROKE
sbQuery.AppendLine(" ,(T2.UrlPathName || T2.UrlDataName) as
FullEventPath "); //must add comma for query manager BROKE
sbQuery.AppendLine(" ,(T1.UrlPathName || T1.UrlDataName) as
FullVenuePath "); //must add comma for query manager BROKE
/// THIS SNIPPET WORKS on BOTH Dev and Live /////////////////////////////////
////but it gives me 24 hour time "Mon 19 May - 17:30"
StringBuilder sbDateTimeQuery = new StringBuilder();
//DateTimeQuery.Append("select ");
sbDateTimeQuery.AppendLine(",case extract( weekday from T2.EventStart) ");
sbDateTimeQuery.AppendLine("when 0 then 'Sun' ");
sbDateTimeQuery.AppendLine("when 1 then 'Mon' ");
sbDateTimeQuery.AppendLine("when 2 then 'Tue' ");
sbDateTimeQuery.AppendLine("when 3 then 'Wed' ");
sbDateTimeQuery.AppendLine("when 4 then 'Thu' ");
sbDateTimeQuery.AppendLine("when 5 then 'Fri' ");
sbDateTimeQuery.AppendLine("when 6 then 'Sat' ");
sbDateTimeQuery.AppendLine("end ");
sbDateTimeQuery.AppendLine("|| ' ' || ");
sbDateTimeQuery.AppendLine("extract(day from T2.EventStart) ");
sbDateTimeQuery.AppendLine("|| ' ' || ");
sbDateTimeQuery.AppendLine("case extract(month from T2.EventStart) ");
sbDateTimeQuery.AppendLine("when 1 then 'Jan' ");
sbDateTimeQuery.AppendLine("when 2 then 'Feb' ");
sbDateTimeQuery.AppendLine("when 3 then 'Mar' ");
sbDateTimeQuery.AppendLine("when 4 then 'Apr' ");
sbDateTimeQuery.AppendLine("when 5 then 'May' ");
sbDateTimeQuery.AppendLine("when 6 then 'Jun' ");
sbDateTimeQuery.AppendLine("when 7 then 'Jul' ");
sbDateTimeQuery.AppendLine("when 8 then 'Aug' ");
sbDateTimeQuery.AppendLine("when 9 then 'Sep' ");
sbDateTimeQuery.AppendLine("when 10 then 'Oct' ");
sbDateTimeQuery.AppendLine("when 11 then 'Nov' ");
sbDateTimeQuery.AppendLine("when 12 then 'Dec' ");
sbDateTimeQuery.AppendLine("end ");
sbDateTimeQuery.AppendLine("|| ' - ' || ");
sbDateTimeQuery.AppendLine("extract(Hour from T2.EventStart) ");
sbDateTimeQuery.AppendLine("|| ':'|| ");
sbDateTimeQuery.AppendLine("extract(minute from T2.EventStart) ");
//DateTimeQuery.AppendLine("--|| ', '|| ");
//DateTimeQuery.AppendLine("--extract(year from T2.EventStart) ");
sbDateTimeQuery.AppendLine("as TheEvDate ");
sbDateTimeQuery.AppendLine(",extract(hour from T2.EventStart) ");
sbDateTimeQuery.AppendLine("|| ':'|| ");
sbDateTimeQuery.AppendLine("extract(minute from T2.EventStart) ");
sbDateTimeQuery.AppendLine("as TheTime ");
//// THIS SNIPPET WORKS ON DEV, but FAILS on live. (even tho it Works
on live FlameRobin) //////////////
//// it gives me 12 hour time "Mon 19 May - 5:30"
StringBuilder sbDateTimeQuery = new StringBuilder();
sbDateTimeQuery.AppendLine(" ( case extract(month from T2.EventStart) ");
sbDateTimeQuery.AppendLine("when 1 then 'Jan' ");
sbDateTimeQuery.AppendLine("when 2 then 'Feb' ");
sbDateTimeQuery.AppendLine("when 3 then 'Mar' ");
sbDateTimeQuery.AppendLine("when 4 then 'Apr' ");
sbDateTimeQuery.AppendLine("when 5 then 'May' ");
sbDateTimeQuery.AppendLine("when 6 then 'Jun' ");
sbDateTimeQuery.AppendLine("when 7 then 'Jul' ");
sbDateTimeQuery.AppendLine("when 8 then 'Aug' ");
sbDateTimeQuery.AppendLine("when 9 then 'Sep' ");
sbDateTimeQuery.AppendLine("when 10 then 'Oct' ");
sbDateTimeQuery.AppendLine("when 11 then 'Nov' ");
sbDateTimeQuery.AppendLine("when 12 then 'Dec' ");
sbDateTimeQuery.AppendLine("end ");
sbDateTimeQuery.AppendLine("|| ' ' || ");
sbDateTimeQuery.AppendLine("extract(day from T2.EventStart) ");
sbDateTimeQuery.AppendLine("|| ' ' || ");
sbDateTimeQuery.AppendLine("case extract(weekday from T2.EventStart) ");
sbDateTimeQuery.AppendLine("when 0 then 'Sun' ");
sbDateTimeQuery.AppendLine("when 1 then 'Mon' ");
sbDateTimeQuery.AppendLine("when 2 then 'Tue' ");
sbDateTimeQuery.AppendLine("when 3 then 'Wed' ");
sbDateTimeQuery.AppendLine("when 4 then 'Thu' ");
sbDateTimeQuery.AppendLine("when 5 then 'Fri' ");
sbDateTimeQuery.AppendLine("when 6 then 'Sat' ");
sbDateTimeQuery.AppendLine("end ");
sbDateTimeQuery.AppendLine("|| ' - ' || ");
sbDateTimeQuery.AppendLine(" case ");
sbDateTimeQuery.AppendLine("when extract(Hour from
T2.EventStart) = 0 then 12 ");
sbDateTimeQuery.AppendLine("when extract(Hour from
T2.EventStart) > 12 then extract(Hour from T2.EventStart) -12 ");
sbDateTimeQuery.AppendLine("else extract(Hour from T2.EventStart) ");
sbDateTimeQuery.AppendLine(" end ");
sbDateTimeQuery.AppendLine("|| ':'|| ");
sbDateTimeQuery.AppendLine("extract(minute from T2.EventStart)
"); //want to add am or pm
sbDateTimeQuery.AppendLine(" || ' - ' || ");
sbDateTimeQuery.AppendLine(" T2.EventName ");
sbDateTimeQuery.AppendLine(" ) as NameDate ");
//as TheDate
//////// This is the from and where used for both versions /////////////
sbQuery.AppendLine(" from CalEvVenue T1 ");
sbQuery.AppendLine(" join CalEvEvent T2 on T1.VenId=T2.VenId ");
sbQuery.AppendLine(" left outer join CALEVEVENT2ARTIST T3 on
T2.CalEvId=T3.CalEvId ");
sbQuery.AppendLine(" left outer join CalEvArtist T4 on T4.ArtId=T3.ArtId ");
sbQuery.AppendLine(" where T2.EventStart > ");
sbQuery.Append("'");
sbQuery.Append(dtThreeDaysAgo.ToString("MM/dd/yyyy HH:mm"));
sbQuery.Append("'");
sbQuery.Append(" and T2.ShouldDisplay = 1 ");
sbQuery.AppendLine(" order by T2.EVENTSTART; ");
//end doc
> --
> Support the ongoing development of Firebird! Consider donating to the
> Firebird Foundation and help ensure its future. Every contribution makes
> a difference. Learn more and donate here:
>
https://www.firebirdsql.org/donate.
> ---
> You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
firebird-net-pro...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/firebird-net-provider/0b37552b-b432-406d-8de7-85cb70cd5795%40lawinegevaar.nl.