Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Datetime formatting on field objects Post Reply Post New Topic
Author Message
deepakpujar
Newbie
Newbie


Joined: 12 Aug 2008
Location: United States
Online Status: Offline
Posts: 1
Quote deepakpujar Replybullet Topic: Datetime formatting on field objects
    Posted: 12 Aug 2008 at 9:09am
I have VB.net application and the app allows the user to set the Current threads culture and datetime and number formats that user wants.
The code that does this is:-

setting the culture on the thread as :
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR")
or
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE")
setting the formats as:
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"
or
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = "dd.MM.yy"

Once the current thread is set to the specific culture and date formats, I use this thread culture info to set the different fields and grids to use this formats.

MY ISSUE IS:-

How can I pass the System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern or System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortTimePattern fro
to the Crystal Report templates which have field objects of datetime type?

My only requirement is, if possible the solution should not be using any formula fields.

It would be great if you can answer this.
Deepak
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.