Hi,
i got a problem using the Format function in my report.
i got a datetime field in my datatable which stores the payment date etc..
01.01.2008 17:34:25
i want to print the date without the timevalue on my report.
i tried using the format function like this
format(WaWi_VKBelegeZKD.Nettodatum, "Short Date")
but this also prints me 01.01.2008 17:34:25.
i also tried using "dd.mm.yyyy". doesnt work too.
Seems that the format type is ignored.
Can you please help ?
Thx
Stephan
using the format function in report
using the format function in report
Think i found a solution.
Now iam using.
MyLinezkd.Append(" bis " & microsoft.VisualBasic.FormatDateTime(WaWi_VKBelegeZKD.Skontodatum2, microsoft.VisualBasic.DateFormat.ShortDate))
which works fine. Is this the Correct way ?..
Thx
Stephan
Now iam using.
MyLinezkd.Append(" bis " & microsoft.VisualBasic.FormatDateTime(WaWi_VKBelegeZKD.Skontodatum2, microsoft.VisualBasic.DateFormat.ShortDate))
which works fine. Is this the Correct way ?..
Thx
Stephan
using the format function in report
Hi Stephan,
If the Payment date is in a Text Field on its own you can use the TextFormat property of the Text component.
This is accessible in the designer from the Properties grid or by right clicking on the Text component and selecting "Text Format" from the context menu.
You can format your date with Format Editor window then.
If your date format isn't available via the "Date" list option you can select custom and you something like dd.MM.yyyy
If the Payment date is in a Text Field on its own you can use the TextFormat property of the Text component.
This is accessible in the designer from the Properties grid or by right clicking on the Text component and selecting "Text Format" from the context menu.
You can format your date with Format Editor window then.
If your date format isn't available via the "Date" list option you can select custom and you something like dd.MM.yyyy
using the format function in report
Or if you wish to use the format function you can do the following for the text components expression:
You can also use the ToString method for any datetime object.
Code: Select all
{Format("{0:MM.dd.yyyy}", MyPaymentDate)}
Code: Select all
MyPaymentDate.ToString("MM.dd.yyyy");
MyPaymentDate.ToShortDateString();
MyPaymentDate.ToLongDateString();
using the format function in report
Thx Brendan.
Its a databasefield.
Your provided methods are working very well.
Thx.
Stephan
Its a databasefield.
Your provided methods are working very well.
Thx.
Stephan