elfenliedtopfan5
Member
- Joined
- Feb 9, 2023
- Messages
- 16
- Programming Experience
- 10+
Good Afternoon,
i have a text file that i parse the example is as shown below,
766,26/01/2021,16:51,6,3,2,Diesel,1249,15120,1888,
768,26/01/2021,17:33,5,1,1,Unleaded,1189,25230,3000,
the end values so 1888
and 3000
are cash values there are a couple of transactions that are in the 100 mark
what i am trying to do is place the the . in the correct place,
so want to turn 1888 to £18.88
and if i have a 100 sale want something like
100.39
but i cant seem to get the normal currency converters to work as i would like,
have tryied the
that did not work so thought string.format would work,
but none are working
any help would be much appreciated as i not quite sure how to accomplish this
Kind Regards
Elfenliedtopfan5
i have a text file that i parse the example is as shown below,
766,26/01/2021,16:51,6,3,2,Diesel,1249,15120,1888,
768,26/01/2021,17:33,5,1,1,Unleaded,1189,25230,3000,
the end values so 1888
and 3000
are cash values there are a couple of transactions that are in the 100 mark
what i am trying to do is place the the . in the correct place,
so want to turn 1888 to £18.88
and if i have a 100 sale want something like
100.39
but i cant seem to get the normal currency converters to work as i would like,
have tryied the
First Attempt:
foreach (var data in dataList)
{
decimal value = data.Field6;
Console.WriteLine(value.ToString("C", CultureInfo.CurrentCulture));
Console.WriteLine(value.ToString("C3", CultureInfo.CurrentCulture));
};
that did not work so thought string.format would work,
Attempt 2:
string.Format("{0:0.00}",data.Field6);
but none are working
any help would be much appreciated as i not quite sure how to accomplish this
Kind Regards
Elfenliedtopfan5