Date formula

venerdì 16 marzo 2007 - 17.01

aleplgr Profilo | Junior Member

Hi! in the Orders table of the xtreme database I'm trying to show all records greater than 05/03/2004, I want to show just the order Id and the Order Date.
To do that I defined the formula {Orders.Order Date}>= #05/03/2004#
and I formatted the field by rightclicking it and selecting in the Date tab the format I want: DD/MM/YYYY it shows the example format 01/03/1999 also shows Day 01, Month 03, Year 1999. And when I run the report without any formula it shows all the date fields correctlly in this format and in the right order.

But when I run the report with the formula it shows all the records starting from 03/05/2004
it should show the order Id 1403 first, this Order has Order Date 05/03/2004, what's happening?
I think it's about the #, I think it does not get the date as a date in the formula...

freeteo Profilo | Guru

Hi, and sorry 4 late...
The problem is that the formula Field of the report, doesn't works like a normal sql syntax, so the "#" char, is not the right way to set a value for the date field.

Try in this way :
{myfield} > Cdate('05/03/2004')

ciao.

Matteo Raumer
[MCAD .net]
http://blogs.dotnethell.it/freeteo
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5